Kth Missing Positive Number || Binary Search || 2-Pointers || Leetcode-1539

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024
  • In this video, I'll talk about how to solve the problem - Kth Missing Positive Number - here we solve this by || 2-Pointers || Binary Search Algorithm.
    Let's Connect:
    📝Linkedin: / aryan-mittal-0077
    📸 Instagram: / aryan_mittal_007
    📱Telegram : t.me/aryan_mit...
    Resources you can try:
    Learn Coding: • Complete RoadMap for C...
    🎥Channel Playlists
    Dynamic Programming: • Complete Dynamic Progr...
    Bit Manipulation: • Complete BIT MANIPULAT...
    Mathematics for DSA: • Complete Mathematics f...
    Leetcode Top Interview Questions: • FAANG & Leetcode Inter...
    Codeforces Problem B Ladder: • Complete PROBLEM B LAD...
    Codeforces Problem C Ladder: • Codeforces PROBLEM C L...
    Codeforces Problem D Ladder: • Complete PROBLEM D LAD...
    About Channel:
    We teach about how you can grow in life & educate about programming in Fun way.
    About Me:
    I am Aryan Mittal - a Software Engineer, Speaker, Creator & Educator. During my free time, I create programming education content on this channel & also how to use that to grow :)
    ✨ Tags ✨
    ✨ Hashtags ✨
    #skills #college #studentslife #students #teenager #life #teenagers #makemoney #students

ความคิดเห็น • 12

  • @ARYANMITTAL
    @ARYANMITTAL  ปีที่แล้ว +1

    Code: leetcode.com/problems/kth-missing-positive-number/solutions/3262503/white-board-solution-binary-search-2-pointers-video-solution-intution/?orderBy=most_votes

  • @abhaykumarsingh3884
    @abhaykumarsingh3884 4 หลายเดือนก่อน

    public int findKthPositive(int[] arr, int k) { //brute force(Two pointer)(O(n))
    int num=1;
    int count=0;
    for(int i=0;i

  • @devanshshrimali2125
    @devanshshrimali2125 ปีที่แล้ว +1

    great explianation

  • @dixitnakhva6181
    @dixitnakhva6181 6 หลายเดือนก่อน

    Thank you sir

  • @aryangupta3257
    @aryangupta3257 ปีที่แล้ว +1

    Not working with testcase k =1 and array {32,59,77} ans should be 33 according to gfg.

  • @user-qb8uo3pf4w
    @user-qb8uo3pf4w 9 หลายเดือนก่อน

    THANKS BROOOOOOOOOOOOOOOOOOOO

  • @yashwants18
    @yashwants18 ปีที่แล้ว

    What if k > last element of arr?

  • @rakibulhasanrumon4884
    @rakibulhasanrumon4884 ปีที่แล้ว

    why there is l+k at the last, and why not r+k?

    • @ARYANMITTAL
      @ARYANMITTAL  ปีที่แล้ว +2

      Both are possible and will give correct result as l==r , hope that solves the doubt :)

  • @sandeeparn
    @sandeeparn ปีที่แล้ว

    Why at last l+k and not r+k

    • @ARYANMITTAL
      @ARYANMITTAL  ปีที่แล้ว

      Both are possible and will give correct result as l==r , hope that solves the doubt :)