Kth Missing Positive Number | Leet code 1539 | Theory explained + Python code

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

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

  • @janmichaelaustria620
    @janmichaelaustria620 3 ปีที่แล้ว +4

    omg best explanation ever! i was getting so tripped with the discussion boards on LC, but this was crystal clear! thank you so much!

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

      Glad it helped !!! and yea same took me quite a while to understand each step.

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

    Thank you! This finally makes sense to me. You have an amazing style of teaching, please keep going!

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

    Best Explanation for this Problem in You tube. Thank You and keep doing this quality of work which is helping a lot of people out there!

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

    very very thank you anna

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

    thank you so much! I've checked out other youtube videos on this topic, and none is as clear as yours.

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

    At 16:00 why did you subtract k & add 1 ??? Basically we got 6 missing number and we want 5th number.. So, cant we just subtract 1 ?
    Can you explain that part?

    • @Sohan2196
      @Sohan2196 2 ปีที่แล้ว

      we subtract k and add 1 because , the value x shows how many missing no are there before it so we are actually standing just one number extra after all those missing numbers!!!
      so to count no of steps we will just subtract the k and add extra 1

  • @lilylily8494
    @lilylily8494 2 ปีที่แล้ว

    Thank you!! Best explanation ever!

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

    what a nice explaination brother . ur video is the best for this question thanks alot for such detailed explaination.

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

    lol, I had a bad habit to pause the video at middle and do it by myself, and there you did the +k mistake, I was confused, logic was right , but why it is not working, Then I start the video again, and I should finish the video First.........It was a really clear explanation , really smooth, thanks

  • @tirthteraiya
    @tirthteraiya 11 หลายเดือนก่อน

    what is the intro song brother

  • @drashtibhardwaj50
    @drashtibhardwaj50 2 ปีที่แล้ว

    Crystal clear explanation ❤️

  • @juliahuanlingtong6757
    @juliahuanlingtong6757 3 ปีที่แล้ว

    Clear explanation!
    just 1 question, why is the break condition set while(left

    • @RaymaxOfficial
      @RaymaxOfficial 2 ปีที่แล้ว

      Because we need to check every possible value that may end up our answer. Thats what binary search does.

  • @abantikatonny
    @abantikatonny 2 ปีที่แล้ว

    time complexity?

  • @MIDNightPT4
    @MIDNightPT4 2 ปีที่แล้ว

    Great explanation!

  • @sankalp702
    @sankalp702 3 ปีที่แล้ว

    what if we made another array with the missing numbers and then simply returned the element at (k-1) index?

    • @vighneshchavan9226
      @vighneshchavan9226 2 ปีที่แล้ว

      That would also work, but it would make space complexity as O(n)

  • @ishayadav001
    @ishayadav001 3 ปีที่แล้ว

    👏🏽👏🏽