Thank you for the video. When would a jump search algorithm (or linear algorithm for that matter) be the optimal / preferred choice over a binary search?
Binary search and jump search will be used in cases where you are dealing with a sorted array, whereas you can use linear search with sorted or unsorted array. Binary search and Jump search have complexities O(logn) and O(sqrt(n)) so they will be faster compared to linear search which has complexity O(n).
@@manavgupta522 That answers the question because he is saying you would use linear search when it is unsorted array, as you cannot use binary or jump search then. Unless you have to perform multiple searches and it becomes more efficient to sort then do binary.
could you please explain why, at 1:55 did you assign 3 to the higher point? what's the logic behind assigning 3 instead of 2 or 4? also, at 2:45 you specify the number of jumps is 1, but going from 0 to 1 you took 1 jump, 1 to 3 that's jump 2. thanks
its because the data is sorted, so if you jump the array by 3 and compare the value and if it is less than the value we are looking for then it not in the part of array that is jumped, this method decrease the time needed, compare to checking each one by one but this only work on sorted data
how can i determine the exact number of indexes to jump? because sometimes it can jump from index 0 to index 4 and then to index 8 and so on... then there are times that it can jump from index 0 to index 3, then index 3 to index 7 and so on... pls notice me. thank you
sir can u plzz upload a video on " sorting of array elements according to their frequency" really need to understand the efficient approach to solve this question , i have a interview in a week . thankyou
It's impossible to make video in such hurry. I will give you the logic. Can you use a map with KEY as array element and the frequency as VALUE. So, whenever the same number comes then you can just increase the frequency VALUE by 1. At the end, sort the Map by VALUE. MapSize = No of unique elements. I hope it's clear now.
One of the most efficient is the one I told you. Don't answer this directly when asked. First answer bruteforce and then answer the optimized approach.
In the question we did in the beginning we get number of jumps = 5 but if we substitute the values of m= 3 and n= 12 in the formula, we are getting 6. Can you please explain what is going on here?
He actually corrected m to be the number of elements in a block so with that he actually has 6 blocks [0;2] [2;4] [4;6] [6;8] [8;10] [10;12] which actually yields 6 but his explanation on that part isn't so clear but nice search he shared.
5:40 if you are searching for time complexity of this algo.
very clear and concise, thank you!
excellent,i wish i could be like u one day
Just keep practicing and you will be :)
clear cut explanations, thank you very much
Welcome :)
God bless those indian guys!! They save the whole it department!!
Loved it sir 🙌
Thaaaanksss a lot for such clear explanation
Welcome
Thank you for the video. When would a jump search algorithm (or linear algorithm for that matter) be the optimal / preferred choice over a binary search?
Binary search and jump search will be used in cases where you are dealing with a sorted array, whereas you can use linear search with sorted or unsorted array. Binary search and Jump search have complexities O(logn) and O(sqrt(n)) so they will be faster compared to linear search which has complexity O(n).
@@rutwikhiwalkar9583 how does that answer the question he asked?
Nope. Binary Search forever
@@rutwikhiwalkar9583 Yes.
@@manavgupta522 That answers the question because he is saying you would use linear search when it is unsorted array, as you cannot use binary or jump search then. Unless you have to perform multiple searches and it becomes more efficient to sort then do binary.
Nice explanation.... keep it up
💯💯💯
Thanks
explanation is so good, what drawing tool you are using?
could you please explain why, at 1:55 did you assign 3 to the higher point? what's the logic behind assigning 3 instead of 2 or 4? also, at 2:45 you specify the number of jumps is 1, but going from 0 to 1 you took 1 jump, 1 to 3 that's jump 2. thanks
its because the data is sorted, so if you jump the array by 3 and compare the value and if it is less than the value we are looking for then it not in the part of array that is jumped, this method decrease the time needed, compare to checking each one by one but this only work on sorted data
this is square root decomposition use case.
osm explanantion anna
why did you differentiate exactly? the concept behind that?
how can i determine the exact number of indexes to jump?
because sometimes it can jump from index 0 to index 4 and then to index 8 and so on...
then there are times that it can jump from index 0 to index 3, then index 3 to index 7 and so on...
pls notice me. thank you
watch my video easy explanation
like nd subs if understand
sir can u plzz upload a video on " sorting of array elements according to their frequency"
really need to understand the efficient approach to solve this question , i have a interview in a week .
thankyou
It's impossible to make video in such hurry. I will give you the logic. Can you use a map with KEY as array element and the frequency as VALUE. So, whenever the same number comes then you can just increase the frequency VALUE by 1. At the end, sort the Map by VALUE. MapSize = No of unique elements. I hope it's clear now.
@@techdose4u Thankyou Sir, is it the most efficient way?
One of the most efficient is the one I told you. Don't answer this directly when asked. First answer bruteforce and then answer the optimized approach.
@@techdose4u thankyou so much sir
Welcome :)
In the question we did in the beginning we get number of jumps = 5 but if we substitute the values of m= 3 and n= 12 in the formula, we are getting 6. Can you please explain what is going on here?
I think his formular should have been [((n-1) / m) + ((n-1) % m)]
He actually corrected m to be the number of elements in a block so with that he actually has 6 blocks [0;2] [2;4] [4;6] [6;8] [8;10] [10;12] which actually yields 6 but his explanation on that part isn't so clear but nice search he shared.
I cant understand him but praise ganesh the lord
Is there a reason to use jump search instead of binary?
Please post more videos
Sure :)
Why do we need to use differentiation for finding the complexity?
We don't need deffenentiation to find complexity. Here we used differentiation to find optimal chunk size
Can you do a pivot search
Where's the code..?
It is in the description. Please read it and let me know if you couldn't find it.
My bad.. Didn't see the description...And thank you..
Welcome :)
عاشت الهند
5555555555AAAAHHHHHHH YA3AAAAAMMM
555555555555555AAAAAAAAAAAAAH