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

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 4. 03. 2023
  • 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_mittal_group
    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

Komentáƙe • 12

  • @ARYANMITTAL
    @ARYANMITTAL  Pƙed rokem +1

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

  • @devanshshrimali2125
    @devanshshrimali2125 Pƙed rokem +1

    great explianation

  • @aryangupta3257
    @aryangupta3257 Pƙed rokem +1

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

  • @dixitnakhva6181
    @dixitnakhva6181 Pƙed 5 měsĂ­ci

    Thank you sir

  • @user-qb8uo3pf4w
    @user-qb8uo3pf4w Pƙed 8 měsĂ­ci

    THANKS BROOOOOOOOOOOOOOOOOOOO

  • @yashwants18
    @yashwants18 Pƙed 11 měsĂ­ci

    What if k > last element of arr?

  • @rakibulhasanrumon4884
    @rakibulhasanrumon4884 Pƙed rokem

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

    • @ARYANMITTAL
      @ARYANMITTAL  Pƙed rokem +2

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

  • @abhaykumarsingh3884
    @abhaykumarsingh3884 Pƙed 3 měsĂ­ci

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

  • @sandeeparn
    @sandeeparn Pƙed rokem

    Why at last l+k and not r+k

    • @ARYANMITTAL
      @ARYANMITTAL  Pƙed rokem

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