No wonder how demotivated I was when I saw that question and was looking for a good explanation since last 7 days (no, not even exaggerating). But, this man is love!!! Keep going @Striver :) You're our hope!!
I was struggling with Binary search on sorted array for a long time, Your key point "Eliminate one half" has cleared my confusion. Thank you so much Striver
None can compete with this man....!!! Simply amazing 👏. Great Work Striver Bhaiyya #DSA ka baap. The best thing about you is that you are not paid and spreading knowledge to all the aspirants...
The best explanation I have found for this problem. Alog is very simple now 1. Identity the sorted half. 2. Check if the target lies in the sorted half. Thats it you need to do this two things only.
Ig after solving like 15 BS problems, that's somewhat how all BS qs probably are. Divide search space into two halves Use some condition to eliminate either of the half from the search space
here after love babar lec - 14 for rotated sorted array he is using the concept of pivot element which is little messy but striver what a lovely lovely explanation in 1 go i understood and coded it myself
honestly I was very confused and demotivated after watching Rohit negi sir's explanation in paid course , i spent 2 hour to understand this problem but could not get it , after watching strivers explanation i get it only after single iteration. thanks a lot . now i am going to follow strivers AtoZ DSA
The one who are selling just their courses and making abundant money are getting more and more fame and heavily recognised today, but the person who truly creating impact is just not even known by everyone today, But anyway thank u so much striver bhaiya , for this great quality content , i wish you will be respected by every cs student of india one day !!
Notes for me☺ As we get our mid at any index checks arr[num]==target if it satisfies return here. After that Case 1> Array is left sorted(we check it by standing on mid), ==>Checks where our target lies in sorted(between low to mid ) or outside it by using if(arr[low]=target) if it lies inside this it indicates we need to collapse window by taking high to mid -1 otherwise low to mid+1 Case 2> Array is right sorted similarly we check for it and updates our low and high accordingly if we never get it we return -1 to it
Amazing video, very good explanations, took sometime to understand but went through it again and again to understand it completely. Thanks for making such quality content Striver Bhai
what i did was i found the starting point using similar approach of binary search then applied binary search from that point...but this approach is goated
Looked at neetcode video, then yours. His explanation was a bit confusing and had to do some examples to understand it. Yours almost made it a regular easy binary search
YOU Can understand very well and i see a many video but my concept is not clear but just i see that video which would be clearly the concept very easily
thank you so much sir...respect for your amazing efforts...really no one teaches better than you... raj cum striver..i wish for your long life and happiness..
Please comment understood and give us a like if you got everything :)
Understood sir! This really cleared my doubt regarding the process the code performed in else part! Thank you sir!!
Very well Understood sir 😀
Understood
Now I clearly know how you got a job at Google.😁
Understood
No wonder how demotivated I was when I saw that question and was looking for a good explanation since last 7 days (no, not even exaggerating). But, this man is love!!! Keep going @Striver :) You're our hope!!
God tier explanation. I truly can't put in words how easily and clearly you were able to explain a seemingly confusing question!
I was struggling with Binary search on sorted array for a long time,
Your key point "Eliminate one half" has cleared my confusion.
Thank you so much Striver
We never move backward bcoz we have Take You Forward😇
That's a good one 😁
little cringe brother.
@@surendharv795 ok so called mature sigma boy
00:24 Problem statement
01:06 Example
01:43 Solution-01 (Linear Search)
02:21 Solution-02 (Binary Search)
05:00 Dry-run
11:42 Pseudocode
15:17 Code
15:28 Complexity
09:56 reaction lol
Correct
nalla bc
@@epsaepsit4645hahahahaha
what an absolutely great explanation. i watched another video before this and it was so convoluted for no reason. yours is so simple and easy to grasp
None can compete with this man....!!! Simply amazing 👏. Great Work Striver Bhaiyya
#DSA ka baap.
The best thing about you is that you are not paid and spreading knowledge to all the aspirants...
I think people should pay for this next level quality content.
@@iamnoob7593 haa...if u wish to.. then plss donate that money to some nearby ngos.
09:56 seriously i watched this many times to see your expression 😄
Yeah and The little smile when he continued... so cute ❤
that,s nice on which lecture you are currently
@@yoongicorn7973
yk striver is a cutie....😉😉
Mujhe mera mele m khoya hua bhai mil gya because our thoughts are same 🤣
got a little distracted. hehe
The best explanation I have found for this problem.
Alog is very simple now
1. Identity the sorted half.
2. Check if the target lies in the sorted half.
Thats it you need to do this two things only.
Ig after solving like 15 BS problems, that's somewhat how all BS qs probably are.
Divide search space into two halves
Use some condition to eliminate either of the half from the search space
here after love babar lec - 14 for rotated sorted array he is using the concept of pivot element which is little messy
but striver what a lovely lovely explanation
in 1 go i understood and coded it myself
I learned recursion stack and queues from him , he's not a good teacher .
Yep that's not intuitive as this the striver's approach is
honestly I was very confused and demotivated after watching Rohit negi sir's explanation in paid course , i spent 2 hour to understand this problem but could not get it , after watching strivers explanation i get it only after single iteration. thanks a lot . now i am going to follow strivers AtoZ DSA
One of the best explanations for this problem on the internet!
The one who are selling just their courses and making abundant money are getting more and more fame and heavily recognised today, but the person who truly creating impact is just not even known by everyone today, But anyway thank u so much striver bhaiya , for this great quality content , i wish you will be respected by every cs student of india one day !!
Notes for me☺
As we get our mid at any index checks arr[num]==target if it satisfies return here.
After that
Case 1>
Array is left sorted(we check it by standing on mid),
==>Checks where our target lies in sorted(between low to mid ) or outside it by using
if(arr[low]=target)
if it lies inside this it indicates we need to collapse window by taking high to mid -1 otherwise low to mid+1
Case 2>
Array is right sorted similarly we check for it and updates our low and high accordingly
if we never get it we return -1 to it
Understood bhaiya , thw way of teching is another level, I don't have words to express my feelings. Thanks a lot, bhaiya!!!
Thank You Raj Vikramaditya.
I am a scaler student , i fond of Your teaching skills more than scaler instructors.
crazy concept striver ! I'm just loving your binary search playlist!!!
Thankyou for providing this course for free bro.
Understood. The best explanation on youtube for this problem..
Understood! This man is a legend...
Understood! Super fantastic explanation as always, thank you so so much for your effort!!
mann unbelievable intuition and explanation!! loved it !!! understood completely
you are the best teacher I finally understood this problem thank you so much
Understood! What a simple and affective explaination
best possible understanding through the BS playlist!
This great quality content for free !!! Amazing work , please keep making these great videos 👏👏👏👏
Amazing video, very good explanations, took sometime to understand but went through it again and again to understand it completely. Thanks for making such quality content Striver Bhai
bhaiya bhot bhot bhot hi aacha genuinely , bhot pyara samjhaya, too good!
bro the way you explain is just amazing thanks a lot
Understood as always! The intuition/approach is just awesome🤩. Spellbound!
Understood, Tq for this great help by teaching in youtube for free
Great Raj bhai... you deserve to be in elite class.
keep rocking
What an explanation bro..
You are our lives savior 🙏🙏
everyone just try dry run after you complete video after your understanding, it really in understanding still better. try ittt
Best explanation so far in binary search
Finally understood this problem. Every time I saw rotated sorted array or binary search in general I always skipped.
what i did was i found the starting point using similar approach of binary search then applied binary search from that point...but this approach is goated
Can't find better explanation than striver .
Totally understood.your teaching is superb.thank you
Looked at neetcode video, then yours. His explanation was a bit confusing and had to do some examples to understand it. Yours almost made it a regular easy binary search
YOU Can understand very well and i see a many video but my concept is not clear but just i see that video which would be clearly the concept very easily
Understood,Thanks stiver for this amazing video.
quality GOD LEVEL 🔥 🔥
thank you so much sir...respect for your amazing efforts...really no one teaches better than you... raj cum striver..i wish for your long life and happiness..
This is the best explanation
Understood Please keep consistent and eventually complete the series of A to Z DSA Course....
Thank You
Understood bro!! Ur a gem!
Only because of you I am loving DSA
one small correction in the code it will fail if the array is [3,1] and target = 1
because of code in line no 9 i.e k
No wrong, let me proove , low = 0 , high = 1 , mid = 0 , Now check if arr[low]
best explanation ever
9:58 what a expression ;) mtlb mza sa aagya😆
Hats off to you❤
understood
Thank you striver for making things easy...
Thankyou for clear explanation. Loved it.
"Identify the sorted half" thank you
Very well explained 👏🏻👏🏻
striver's explanations are the best
Thank u for such a great explaination
Understood, thanks for your efforts!
Absolutely understand ❤
Love you bhaiya . You are my inspiration ❤
great explanation buddy !
Best explanation💯
woww what a great explanation
Can anyone share the video link for peak element ?
Elimination is key - GOLDEN WORDS
Best Explanation!
Amazing explanation sir 😇!
Greatly explained 👏👏
Understood🙌
Understood well thanks for this valuable video sir
Love the explanation. THanks
Great help you are doing
Great explanation.
UNDERSTOOD Striver Op🔥🔥
Nice Explanation!👍
1 QUESTION : will this approach/code work in the case of left rotated array also?? bacause here you explained for right rotated example.
Yes , same code will be there for left rotared.
Any thoughts on this corner case not passing: ARR=[3,1], target:1, Why is that? How to generalize the solution?
Other than that, beautiful explanation charm💯💯
sir Best explanation Thanks!!
dill se thank you!
Very nice explanation. Thank you
9:56
Perfect reaction 😂
Understood very well !
Understood bro,thank you so much.
Great Explaination
Understood!
Understood it very well :)
understood sir
Understood sir ❤
UNDERSTOOD SIR!
9:57 sir is so much excited
Very good explanation
Thank You Striver....Understood it
Understood Bhaiya!
When we say that val @low < val @high means array is sorted, how about the case when the array is reverse sorted and rotated somewhere?
Nice Explanation😄
understood
Understood✅🔥🔥
Great, master ji.