Kth Missing Positive Number (LeetCode 1539) | Full Solution with intuition, animations and visuals

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ •

  • @motupatlu-tt2fe
    @motupatlu-tt2fe 13 днів тому +1

    The most underrated channel with the best video explanations🙂🙂👍👍

  • @Iam_Srikanth_009
    @Iam_Srikanth_009 8 місяців тому +3

    Really this guy needs a lot of support....
    Thank you for explaining this problem and making me to understand it 😊.
    Really hats off for your explanation

    • @nikoo28
      @nikoo28  8 місяців тому

      Thanks for all the support and motivation

  • @shreyak23
    @shreyak23 5 місяців тому

    Though I'm solving LeetCode problems using JavaScript, but can understand it in Java too. Thank you for such great explanations.

  • @ed2023bc
    @ed2023bc 4 дні тому

    Great explanation, thank you!

  • @thalap_74-
    @thalap_74- 3 місяці тому

    Thanks for making the video despite the views

  • @Satya-g5t
    @Satya-g5t Місяць тому

    Whatever problems Nikhil solves, he makes sure that the concept is explained clearly. 😄

  • @DharaniChavala
    @DharaniChavala 6 місяців тому

    very nice and clear explanation.

  • @sumangupta5292
    @sumangupta5292 7 місяців тому +1

    The explanation is excellent. However I have 2 questions - 1. Why we take right as arr.length and not arr.length-1 , 2. How did we arrive at return left + k?

    • @nikoo28
      @nikoo28  7 місяців тому +2

      1. to get a mid value, you are actually looking at the number of elements, and not the index. Thus, right will be the actual array length.
      2. adding k to the 'left' will actually land you at the missing number.

  • @vipul20465
    @vipul20465 8 місяців тому

    Hey Nikhil, Thanks for the awesome explanation. I attempted to come up with a brute-force solution as per the explanation provided in the video to locate the kth positive element, but unfortunately, it's not passing all of the test cases. Could you please share the brute-force implementation of this problem.

  • @gpraneeth7693
    @gpraneeth7693 8 місяців тому

    Helped a lot

  • @rambhaktuchihaobito7987
    @rambhaktuchihaobito7987 5 місяців тому

    Thank you ..sir❤❤

  • @subee128
    @subee128 8 місяців тому

    Thank you very much

  • @unknownman1
    @unknownman1 8 місяців тому +1

    Thanks !

  • @Adeetisharma-nu8jg
    @Adeetisharma-nu8jg 6 місяців тому

    thankyou so much

  • @jayeshpatil5757
    @jayeshpatil5757 6 місяців тому

    19:04, 10 July , watching.
    Red cloth washed at 18:53,10 July.

  • @adityaarya3249
    @adityaarya3249 7 місяців тому

    Why didn't you take right = arr.length -1;

    • @sumangupta5292
      @sumangupta5292 7 місяців тому

      I have the same question. Generally we take right pointer as arr.length-1

    • @je2587
      @je2587 7 місяців тому

      @@sumangupta5292 not sure if this answers your question but since we do while(left < right), we need to do right=arr.length before. If you go with arr.length-1, you would go with while(left

  • @sksabir8063
    @sksabir8063 6 місяців тому

    🤩