First and Last Position of Element Sorted Array (LeetCode 34) | Full Solution | Study Algorithms

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

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

  • @MVCSPratyushKumarShekhar
    @MVCSPratyushKumarShekhar 3 ปีที่แล้ว +11

    This is really one of the most underrated video on TH-cam. The way you have explained this concept is awesome. Please do continue this good work. Everyone can be a good programmer/coder but everyone can't be a good teacher.

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

      Thanks for all the love and support

  • @saitejanedunoori5451
    @saitejanedunoori5451 8 หลายเดือนก่อน +2

    I just started learning DSA when i am unable to solve leet code problem i first search in your youtube channel for a solution, In my opinion you are best at explain algorithms, Keep on going .

  • @HarshChauhan-ur4jy
    @HarshChauhan-ur4jy 3 หลายเดือนก่อน +1

    I watched two explanations before this but couldn’t understand them. However, your teaching method was awesome, and I was able to write the code on my own right after understanding your solution. Thank you!

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

    the best , easy and good approach for the problem thanku so much nikhil for this

  • @Sridevikrish21
    @Sridevikrish21 4 หลายเดือนก่อน +1

    the way of teaching makes us to solve the more problems

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

      love it

  • @mikedelta658
    @mikedelta658 9 หลายเดือนก่อน +1

    Fantastic and clear explanation. Thank you!

    • @nikoo28
      @nikoo28  8 หลายเดือนก่อน

      You're very welcome!

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

    u explain everything and it was quite easy to understand, thankyouuu

  • @krishnenduroy3673
    @krishnenduroy3673 2 หลายเดือนก่อน

    It was super smooth and easy to understand. Thanks 👍

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

    The way you make things clear is superr

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

    The way of your explanation excellent 👏👏👏

  • @Parth-z1k
    @Parth-z1k 3 ปีที่แล้ว +1

    Great Explanation👏👏👏

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

    please upload more dsa question.. i only want to learn from you

  • @rambhaktuchihaobito7987
    @rambhaktuchihaobito7987 3 หลายเดือนก่อน

    Thank you sir ❤

  • @casstansa
    @casstansa 3 หลายเดือนก่อน

    brilliant🤩

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

    Will this solution work if input is [1,2,3] and target is 2

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

    What happens if the first and the last index both exists in left bound? or right bound? this approach will return last index or first index as -1 right?

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

      Let’s say both first and last exist in the left bound.
      When you first divide the array, you will not find the element in the middle, so following a binary search algorithm you will look in the left half. This will be your new array now.
      So you will again find the first and last index in the left half.
      Try out a test case on your own and you will understand it better :)

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

      @@nikoo28 Kind of recursive

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

      Yes indeed…this is a recursive solution. Just like binary search.

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

      @@nikoo28 thank you

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

      @@nikoo28 when low < high breaks the loop and the low value = 3 but the index value is still 2 how will you get 3 as output plz explain sir

  • @KUNALPRAJAPATI-fi3jy
    @KUNALPRAJAPATI-fi3jy 7 หลายเดือนก่อน

    just love the explanation

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

    please upload more dsa question.. i only want to learn from you

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

    please upload more dsa question.. i only want to learn from you