BS-4. Search Element in Rotated Sorted Array - I

  Рет қаралды 225,210

take U forward

take U forward

Жыл бұрын

Problem Link: bit.ly/3OmIp5d
Notes/C++/Java/Python codes: takeuforward.org/data-structu...
We have solved the problem, and we have gone from brute force and ended with the most optimal solution. Every approach's code has been written in the video itself. Also, we have covered the algorithm with intuition.
Full Course: bit.ly/tufA2ZYt
You can follow me across social media, all my handles are below:
Linkedin/Instagram/Telegram: linktr.ee/takeUforward
0:00 Introduction of Course

Пікірлер: 397
@takeUforward
@takeUforward Жыл бұрын
Please comment understood and give us a like if you got everything :)
@redstormthecoder5818
@redstormthecoder5818 Жыл бұрын
Understood sir! This really cleared my doubt regarding the process the code performed in else part! Thank you sir!!
@motivationalquotes8545
@motivationalquotes8545 Жыл бұрын
Very well Understood sir 😀
@sudhanshushekhar4222
@sudhanshushekhar4222 Жыл бұрын
Understood
@utsavseth6573
@utsavseth6573 Жыл бұрын
Now I clearly know how you got a job at Google.😁
@venup2813
@venup2813 Жыл бұрын
Understood
@abhisheksinghmehra9576
@abhisheksinghmehra9576 Жыл бұрын
We never move backward bcoz we have Take You Forward😇
@satendra6200
@satendra6200 Жыл бұрын
That's a good one 😁
@surendharv795
@surendharv795 4 ай бұрын
little cringe brother.
@lofireverbz-wy7go
@lofireverbz-wy7go 11 ай бұрын
09:56 seriously i watched this many times to see your expression 😄
@yoongicorn7973
@yoongicorn7973 9 ай бұрын
Yeah and The little smile when he continued... so cute ❤
@lofireverbz-wy7go
@lofireverbz-wy7go 9 ай бұрын
that,s nice on which lecture you are currently @@yoongicorn7973
@chaudharyalisha7175
@chaudharyalisha7175 8 ай бұрын
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!!
@yash-seth
@yash-seth 10 ай бұрын
God tier explanation. I truly can't put in words how easily and clearly you were able to explain a seemingly confusing question!
@junaidahmed3615
@junaidahmed3615 10 ай бұрын
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
@hilal937
@hilal937 8 ай бұрын
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
@monstercoder3665
@monstercoder3665 Жыл бұрын
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...
@iamnoob7593
@iamnoob7593 Жыл бұрын
I think people should pay for this next level quality content.
@shubhamkumar-hx1fb
@shubhamkumar-hx1fb 8 ай бұрын
@@iamnoob7593 haa...if u wish to.. then plss donate that money to some nearby ngos.
@nagame859
@nagame859 Жыл бұрын
Understood as always! The intuition/approach is just awesome🤩. Spellbound!
@cinime
@cinime Жыл бұрын
Understood! Super fantastic explanation as always, thank you so so much for your effort!!
@ML-ok9nf
@ML-ok9nf 8 ай бұрын
One of the best explanations for this problem on the internet!
@ishangujarathi10
@ishangujarathi10 Жыл бұрын
mann unbelievable intuition and explanation!! loved it !!! understood completely
@junaiid0104
@junaiid0104 28 күн бұрын
crazy concept striver ! I'm just loving your binary search playlist!!!
@kaushiksen2190
@kaushiksen2190 10 ай бұрын
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
@pratikkumarsingh8114
@pratikkumarsingh8114 9 ай бұрын
Understood bhaiya , thw way of teching is another level, I don't have words to express my feelings. Thanks a lot, bhaiya!!!
@mehulthuletiya497
@mehulthuletiya497 Жыл бұрын
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
@epsaepsit4645
@epsaepsit4645 Жыл бұрын
09:56 reaction lol
@annusharma4764
@annusharma4764 Жыл бұрын
Correct
@xyzxyz9249
@xyzxyz9249 11 ай бұрын
nalla bc
@senseiAree
@senseiAree 10 ай бұрын
​@@epsaepsit4645hahahahaha
@mriit3025
@mriit3025 3 ай бұрын
best possible understanding through the BS playlist!
@hrishii.02
@hrishii.02 2 ай бұрын
Understood! What a simple and affective explaination
@k.satish3663
@k.satish3663 Жыл бұрын
Totally understood.your teaching is superb.thank you
@swathigp3818
@swathigp3818 4 ай бұрын
This great quality content for free !!! Amazing work , please keep making these great videos 👏👏👏👏
@adarshmv261
@adarshmv261 3 ай бұрын
Understood. The best explanation on youtube for this problem..
@venkatesasrikanthdhulipala9486
@venkatesasrikanthdhulipala9486 10 ай бұрын
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
@user-pr8ir3ow3v
@user-pr8ir3ow3v Жыл бұрын
Great Raj bhai... you deserve to be in elite class. keep rocking
@revanthkumar5417
@revanthkumar5417 Жыл бұрын
Best explanation so far in binary search
@reyanshmishra7676
@reyanshmishra7676 Жыл бұрын
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.
@HarshSingh-hk8fe
@HarshSingh-hk8fe 7 ай бұрын
bro the way you explain is just amazing thanks a lot
@kumpatisupriya3947
@kumpatisupriya3947 8 ай бұрын
What an explanation bro.. You are our lives savior 🙏🙏
@venkatsaireddy1412
@venkatsaireddy1412 6 ай бұрын
Thank You Raj Vikramaditya. I am a scaler student , i fond of Your teaching skills more than scaler instructors.
@beingproductive22
@beingproductive22 6 ай бұрын
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
@Josuke217
@Josuke217 22 күн бұрын
I learned recursion stack and queues from him , he's not a good teacher .
@ADITYASRIVASTAVABCE
@ADITYASRIVASTAVABCE Жыл бұрын
Thankyou for clear explanation. Loved it.
@akaashk623
@akaashk623 11 ай бұрын
Greatly explained 👏👏
@abhimanyuambastha2595
@abhimanyuambastha2595 5 ай бұрын
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
@user-ti3bd8mp1w
@user-ti3bd8mp1w Жыл бұрын
understood Thank you striver for making things easy...
@rashmirsd
@rashmirsd Жыл бұрын
Very nice explanation. Thank you
@hareshnayak7302
@hareshnayak7302 4 ай бұрын
Understood,Thanks stiver for this amazing video.
@mdsalimtauheedm-5810
@mdsalimtauheedm-5810 5 ай бұрын
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
@rajkumarvb5197
@rajkumarvb5197 9 ай бұрын
Understood, thanks for your efforts!
@UserUser-tn8tv
@UserUser-tn8tv 6 ай бұрын
Understood Please keep consistent and eventually complete the series of A to Z DSA Course.... Thank You
@unknown2003august
@unknown2003august Ай бұрын
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
@manishdhekane5393
@manishdhekane5393 Жыл бұрын
Understood very well !
@nikhilkumarjamwal5322
@nikhilkumarjamwal5322 8 ай бұрын
Nice Explanation!👍
@prathamrawat6298
@prathamrawat6298 Ай бұрын
bhaiya bhot bhot bhot hi aacha genuinely , bhot pyara samjhaya, too good!
@prernagupta7450
@prernagupta7450 5 ай бұрын
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
@rtheame4704
@rtheame4704 3 ай бұрын
Very well explained 👏🏻👏🏻
@user-iv1ik6nq3y
@user-iv1ik6nq3y Ай бұрын
Great explanation.
@ayushichoudhary1019
@ayushichoudhary1019 Жыл бұрын
Best Explanation!
@vinitverma1741
@vinitverma1741 10 ай бұрын
Thank u for such a great explaination
@user-el6hv6em7m
@user-el6hv6em7m Жыл бұрын
Understood it very well :)
@harshdiwan9283
@harshdiwan9283 Жыл бұрын
understood very well 🙌
@myproject6768
@myproject6768 Жыл бұрын
Absolutely understand ❤
@radha7492
@radha7492 10 ай бұрын
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..
@umangkumar2005
@umangkumar2005 5 ай бұрын
This is the best explanation
@sopparipraveen1212
@sopparipraveen1212 Жыл бұрын
Great explanation
@tree7500
@tree7500 Жыл бұрын
yes understood will try it out
@neerajpruthi8350
@neerajpruthi8350 5 ай бұрын
Love the explanation. THanks
@sanchisingh5117
@sanchisingh5117 Жыл бұрын
striver's explanations are the best
@Abhishekkumarnjw22-vf7cr
@Abhishekkumarnjw22-vf7cr 11 күн бұрын
Great help you are doing
@harshilpatel3205
@harshilpatel3205 6 ай бұрын
Amazing explanation sir 😇!
@mukeshnayal624
@mukeshnayal624 Жыл бұрын
dill se thank you!
@srutisingh4629
@srutisingh4629 8 ай бұрын
Hats off to you❤
@Musicuvakavi1823
@Musicuvakavi1823 4 ай бұрын
Understood well thanks for this valuable video sir
@AshishSharma-kg1yy
@AshishSharma-kg1yy 28 күн бұрын
woww what a great explanation
@AbhijeetMuneshwar
@AbhijeetMuneshwar 2 ай бұрын
Understood very well !!!
@VasanthChoudary-uc5cz
@VasanthChoudary-uc5cz 8 ай бұрын
Thankyou for providing this course for free bro.
@rahuljain224
@rahuljain224 2 ай бұрын
Excellent explanation
@kingbadshah452
@kingbadshah452 6 ай бұрын
thanks striver understood everything
@sreevarshinirg4319
@sreevarshinirg4319 Ай бұрын
Understood, Tq for this great help by teaching in youtube for free
@rakshitraushan1650
@rakshitraushan1650 5 ай бұрын
Understood bro!! Ur a gem!
@user-cz4fw7ls8m
@user-cz4fw7ls8m 2 ай бұрын
Nice Explanation😄
@yashraorane578
@yashraorane578 20 күн бұрын
Best explanation💯
@bujagawnisaitejagoud2461
@bujagawnisaitejagoud2461 2 ай бұрын
Very good explanation
@samuelfrank1369
@samuelfrank1369 10 ай бұрын
Understood. Thanks a lot.
@BalajiG-ms3vu
@BalajiG-ms3vu 3 ай бұрын
Understood bro,thank you so much.
@sandeeprajsaimon8600
@sandeeprajsaimon8600 Ай бұрын
best explanation ever
@manavsingh5919
@manavsingh5919 11 ай бұрын
Thank You Striver....Understood it
@anishasaini380
@anishasaini380 4 ай бұрын
sir Best explanation Thanks!!
@sujalgupta6100
@sujalgupta6100 3 ай бұрын
Finally understood this problem. Every time I saw rotated sorted array or binary search in general I always skipped.
@KEVALMEHTA-qe1ic
@KEVALMEHTA-qe1ic 9 ай бұрын
Good Explanation
@artofwrick
@artofwrick 10 ай бұрын
Great, master ji.
@roopeshdevapatiroopesh8388
@roopeshdevapatiroopesh8388 6 ай бұрын
understood, thanks striver
@Raj-jw7kq
@Raj-jw7kq 18 күн бұрын
quality GOD LEVEL 🔥 🔥
@Sparky579
@Sparky579 3 ай бұрын
watching this on 0.75x playback speed feels like I'm watching a drunk person explaining me how to solve this problem.
@aaranyaksantra9933
@aaranyaksantra9933 Ай бұрын
nice explanation
@sajeedalreefy4713
@sajeedalreefy4713 7 ай бұрын
Great Describing
@ujjawalchourasiya3988
@ujjawalchourasiya3988 5 ай бұрын
Love you bhaiya . You are my inspiration ❤
@ankush8243
@ankush8243 5 ай бұрын
Thank you so much!
@NazeerBashaShaik
@NazeerBashaShaik 4 ай бұрын
Understood, thank you.
@bhuoneparmar5098
@bhuoneparmar5098 Жыл бұрын
understand bro !! keep uploading :)
@Agustus1231
@Agustus1231 3 ай бұрын
Very well Understood sir
@dayashankarlakhotia4943
@dayashankarlakhotia4943 Жыл бұрын
Good explanation
@HarshSingh-nq4oe
@HarshSingh-nq4oe 22 күн бұрын
Understood Thank you.
@shreyanshmittal9381
@shreyanshmittal9381 Жыл бұрын
Understood bhaiya!
@itzmartin20
@itzmartin20 10 ай бұрын
UNDERSTOOD SIR!
@user-gm5fq4jg3m
@user-gm5fq4jg3m Жыл бұрын
Understood sir ❤
@user-hh9uk7sk3w
@user-hh9uk7sk3w 5 күн бұрын
understood nicely
@thanziaa3215
@thanziaa3215 Ай бұрын
superb videos
@infernogamer52
@infernogamer52 Жыл бұрын
Understood Bhaiya!
@nayanbramhane8077
@nayanbramhane8077 7 ай бұрын
acche se samzaya, thanks
@habeeblaimusa4466
@habeeblaimusa4466 Жыл бұрын
Understood bro 😁😊
@SapnaSingh-rw1py
@SapnaSingh-rw1py Жыл бұрын
Understood🙌
BS-5. Search Element in Rotated Sorted Array II
12:44
take U forward
Рет қаралды 147 М.
5 Math Skills Every Programmer Needs
9:08
Sahil & Sarra
Рет қаралды 1 МЛН
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 133 МЛН
❌ Don't Run Behind 500 LEETCODE Problems ❌ Focus on QPCD
8:31
BS-27. Median in a Row Wise Sorted Matrix
23:13
take U forward
Рет қаралды 79 М.
Why UK 🇬🇧 is going Bankrupt? : Detailed Economic Case Study
20:37
The Best Browsers for Privacy and Ad Blocking
8:40
Mental Outlaw
Рет қаралды 9 М.
84,981,532 Players Just Got Banned From Roblox...
8:06
Chaseroony
Рет қаралды 138 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 634 М.
BS-9. Find Peak Element
32:53
take U forward
Рет қаралды 152 М.
BS-6. Minimum in Rotated Sorted Array
17:08
take U forward
Рет қаралды 148 М.
8 patterns to solve 80% Leetcode problems
7:30
Sahil & Sarra
Рет қаралды 292 М.