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

  Рет қаралды 15,112

Nikhil Lohia

Nikhil Lohia

Күн бұрын

Пікірлер: 27
@MVCSPratyushKumarShekhar
@MVCSPratyushKumarShekhar 3 жыл бұрын
This is really one of the most underrated video on KZbin. 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 жыл бұрын
Thanks for all the love and support
@HarshChauhan-ur4jy
@HarshChauhan-ur4jy 2 ай бұрын
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 12 күн бұрын
the best , easy and good approach for the problem thanku so much nikhil for this
@saitejanedunoori5451
@saitejanedunoori5451 7 ай бұрын
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 .
@krishnenduroy3673
@krishnenduroy3673 Ай бұрын
It was super smooth and easy to understand. Thanks 👍
@Sridevikrish21
@Sridevikrish21 4 ай бұрын
the way of teaching makes us to solve the more problems
@nikoo28
@nikoo28 4 ай бұрын
love it
@mikedelta658
@mikedelta658 8 ай бұрын
Fantastic and clear explanation. Thank you!
@nikoo28
@nikoo28 7 ай бұрын
You're very welcome!
@aarzoo2302
@aarzoo2302 Жыл бұрын
u explain everything and it was quite easy to understand, thankyouuu
@siva_avinash_
@siva_avinash_ Жыл бұрын
The way you make things clear is superr
@sohitmaurya4782
@sohitmaurya4782 3 жыл бұрын
Great Explanation👏👏👏
@atifraza9960
@atifraza9960 2 жыл бұрын
The way of your explanation excellent 👏👏👏
@ashishsonii
@ashishsonii 8 күн бұрын
please upload more dsa question.. i only want to learn from you
@rambhaktuchihaobito7987
@rambhaktuchihaobito7987 2 ай бұрын
Thank you sir ❤
@casstansa
@casstansa 3 ай бұрын
brilliant🤩
@_shezzy
@_shezzy 5 ай бұрын
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 жыл бұрын
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 6 ай бұрын
just love the explanation
@ashishsonii
@ashishsonii 8 күн бұрын
please upload more dsa question.. i only want to learn from you
@ashishsonii
@ashishsonii 8 күн бұрын
please upload more dsa question.. i only want to learn from you
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 13 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 13 МЛН
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Is Computer Science still worth it?
20:08
NeetCodeIO
Рет қаралды 363 М.
BS-3. First and Last Occurrences in Array | Count occurrences in Array
25:28
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 397 М.
Find First and Last Position of Element in Sorted Array | Leetcode - 34
9:09
Algorithms Made Easy
Рет қаралды 14 М.
BS-8. Single Element in Sorted Array
22:16
take U forward
Рет қаралды 158 М.
3 Types of Algorithms Every Programmer Needs to Know
13:12
ForrestKnight
Рет қаралды 477 М.
5 First and Last occurrence of an Element
11:33
Aditya Verma
Рет қаралды 184 М.
Don't look down on anyone#devil  #lilith  #funny  #shorts
00:12
Devil Lilith
Рет қаралды 13 МЛН