Search an element in a sorted and rotated array | GeeksforGeeks

  Рет қаралды 75,494

GeeksforGeeks

GeeksforGeeks

7 жыл бұрын

Explanation for the article: www.geeksforgeeks.org/search-a...
This video is contributed by Harshit Jain.
Read More: www.geeksforgeeks.org/search-...

Пікірлер: 32
@raghavchadha9133
@raghavchadha9133 7 жыл бұрын
clear it with some examples ...reading algo we will do it ourselves ,,
@GeeksforGeeksVideos
@GeeksforGeeksVideos 7 жыл бұрын
Thanks for the feedback. We have shared this with our contributor. :)
@akshaydwivedi935
@akshaydwivedi935 5 жыл бұрын
you are just making a simple algo sophisticated by the way you explain
@vaishnavigoteti8841
@vaishnavigoteti8841 4 жыл бұрын
Great Job Geeksforgeeks! this video is certainly not for the beginners, but for intermediate level programmers. The algorithm was very clearly demonstrated.
@pman-codes
@pman-codes 4 жыл бұрын
How can you pass 0 and n-1 as low and high and compare them with the mid where the array is pivoted in the first place?
@shwetadk1986
@shwetadk1986 5 жыл бұрын
Giving an example would definitely be better but your explaination is very good, much better than just reading the text. Thanks. Keep making such videos.
@subham-raj
@subham-raj 4 жыл бұрын
*This is what happens when you memorize*
@sainathpatil6893
@sainathpatil6893 3 жыл бұрын
in the solution on last line return search(arr, l, mid - 1, key); -- is it required ?
@amanjaiswal4847
@amanjaiswal4847 2 жыл бұрын
7:28 high < low can any one explain what does it actually mean?
@techwithrajdeep7633
@techwithrajdeep7633 3 жыл бұрын
why it was given if l>h
@tcob78vaibhavwable95
@tcob78vaibhavwable95 2 жыл бұрын
can we have more vedios on DE Shaw interview preperation
@SaifurRahman92
@SaifurRahman92 5 жыл бұрын
Intern ka kaam hai ye pakka.
@kaushikkumar1139
@kaushikkumar1139 2 жыл бұрын
Thank you for the explanation!
@satyamgupta5234
@satyamgupta5234 3 жыл бұрын
Why are we checking from first element to key element ? How ??
@praveenchouhan6388
@praveenchouhan6388 4 жыл бұрын
nice explaination!!!!!!!!!
@saikumarmadhadi473
@saikumarmadhadi473 6 жыл бұрын
finding pivot will itself take O(n) in worst case, so i guess linear search will also be a considerable option
@spicytuna08
@spicytuna08 5 жыл бұрын
i agree. the logic is too complex for O log n method.
@gsb22
@gsb22 3 жыл бұрын
@@spicytuna08 nope, finding of pivot would be done in O(logn) since we would employ binary search there as well.
@jaatharsh
@jaatharsh 3 жыл бұрын
hey GFG thanks fr the video
@akankshagupta3881
@akankshagupta3881 6 жыл бұрын
You just read the algorithm that's it , there is no use of any of your videos. This is very disappointing from your side "geeksforgeeks"
@spicytuna08
@spicytuna08 5 жыл бұрын
finding pivot code is too complex. prone for an error. if traversing every element is O(n), use easier method to get a pivot.
@gsb22
@gsb22 3 жыл бұрын
if you are going to do find pivot using O(n) why do this at all, Simply run linear search then..
@adityapalavajjhala1841
@adityapalavajjhala1841 3 жыл бұрын
ahhhhh
@vidurbhardwaj4001
@vidurbhardwaj4001 5 жыл бұрын
I think you are confused by yourself
@ragas_
@ragas_ 3 жыл бұрын
GfG should just give up this stuff. Extremely confusing
@vidurbhardwaj4001
@vidurbhardwaj4001 5 жыл бұрын
wtf type of explaination
@hemant_malav
@hemant_malav 3 жыл бұрын
Isse Accha aap Hindi me explain kare to jada acche se samaj aayega
@alperozdamar517
@alperozdamar517 5 жыл бұрын
So disappointing. Without explanation reading code line by one doesn't make any sense. Everybody can do it! You need to add clear explanations and examples.
@karimfarhouti229
@karimfarhouti229 6 жыл бұрын
while the array is sorted we don't have to do any search i think ,here's a simple fun int fun(int arr[],size_t t_size,unsigned int n) { if (n
@AmanGupta-eh4qs
@AmanGupta-eh4qs 2 жыл бұрын
Top_coder reached here only😅😁
BS-8. Single Element in Sorted Array
22:16
take U forward
Рет қаралды 119 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 94 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 15 МЛН
Detect cycle in an undirected graph | GeeksforGeeks
7:20
GeeksforGeeks
Рет қаралды 119 М.
BS-27. Median in a Row Wise Sorted Matrix
23:13
take U forward
Рет қаралды 68 М.
LeetCode 33. Search in Rotated Sorted Array
9:30
Nick White
Рет қаралды 97 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 117 М.
Largest Sum Contiguous Subarray | GeeksforGeeks
14:06
GeeksforGeeks
Рет қаралды 219 М.
Count the Occurrences of a Value in an Array | C Programming Example
10:26
Search in Rotated Sorted Array  #Binary Search Rotations Leetcode 33.
21:09
The unfair way I got good at Leetcode
6:47
Dave Burji
Рет қаралды 391 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 18 МЛН