I am curious about the hash function, which decides in what bucket the element should go to...
@kainaatmakhani6550 Жыл бұрын
Very informative lecture. Mujhe padne mein bht maza aaya.
@srishti663711 ай бұрын
The only regret after watching his videos is that why doesn't we have his videos for all the dsa concepts😢
@nikoo2810 ай бұрын
covering them one by one 😄
@HumamNaveed-ws9in29 күн бұрын
How are we finding the number of actual buckets required like we are having 5 buckets,We do find the range as 20 so the number would be 5 in each pf the buckets but how we find the actual buckets
@diegojb88962 жыл бұрын
Thank you for the explanation and the nice edition of the video!
@tsvmanojturlapati44923 жыл бұрын
God Bless You Bro.Want more like this. Do more on Webdevlopment
@aumuamuanakakara99083 жыл бұрын
thank you so much!! finally understood!
@MadpolygonDEV8 ай бұрын
whats the way to hash the values to the correct buckets? just num/bucketcount? So number 4 would go in bucket 0 (assuming 5 buckets and range of 20) and 5 would go in bucket 1 and so on? However that would make it so bucket 1 is containing 1-4 and 5-9 and so on. Thank you
@nikoo288 ай бұрын
it is upto you how you describe your hash function. The code needs to be tweaked accordingly
@MadpolygonDEV8 ай бұрын
@@nikoo28 thanks. You re really great at explaining concepts and i usually understand your style quite well
@maammaam59766 ай бұрын
int index = (arr[i] - 1) / BUCKET_SIZE; i used this formula
@NicoletteHickly Жыл бұрын
This was so helpful, thank you so much
@sarthakyadav99503 жыл бұрын
Thanks bro your explanation was very nice 🙌🙌 Keep it up👍
@kainaatmakhani6550 Жыл бұрын
Sir you have made the mistake you have written 21, 22, 22, 24. In last bucket the values will be 21, 21, 22, 24.
@nikoo28 Жыл бұрын
Thanks for the correction :)
@user-my6yf1st8z2 жыл бұрын
thanks, very clear explanation indeed
@babushaikh65823 жыл бұрын
Excellent Explanation . teaching using techology
@contentshark51223 ай бұрын
What specific sorting teqnique is used here other than creating some buckets....this doesnt emphasize on any specific sorting teqnique though the name us bucketsort
@Lee-zo3dy6 ай бұрын
great videos
@xofrio3 жыл бұрын
Uhm, could you explain for me two simple things: number_of_buckets and bucket_range? The thing is, that square root of (20) for me is 4 point something which is 4. And 20 / 4 equals to 5. So there will be 4 buckets: 1-5, 6-10, 11-15, 15-20. How should I fix the formula for either number_of_buckets or bucket_range? I'm using c++ and it's strange for me that in Java ceil((double) 20 / 5) is not equal to 4 point nothing. And yep, I'm aware of IEEE-754, but in this particular case it gives me 4, not 4.something. I do understand that the upper bound for the last bucket should be a bit greater than the maximum value, but what should be the right formula? Is static_cast((range / number_of_buckets)) + 1 correct?
@nikoo283 жыл бұрын
Hi Andrew, do you see how I use the method Math.ceil() to calculate the bucket size. That rounds off the value to upper integer. So, Math.ceil(6.2) = 7 But as a reminder, there is no "right" formula for a bucket range. Square root just gives you an estimate of the bucket size. As a rule of thumb, you shouldn't have a lot of buckets, and you should try to have a uniform distribution of elements. So, I would conclude with the fact that bucket range is more determined by the input set you have. Let me know if you still have doubts.
@xofrio3 жыл бұрын
@@nikoo28 Oh, I thought that there is a "right" formula based on some researches or computations/tests (there's not much out there about this sorting algorithm). So it really requires uniform distibution just like interpolation search. It sounds right, because as you mentioned in video I can end up with one big bucket with 300 elements, while the others will remain [almost] empty. And about ceil. Yeah, I saw that ceil usage. Yet still ceil(20.0/5)==ceil(4.0)==4.0 for me but I got the idea, so thank you!
@joshwzr12572 жыл бұрын
Thanks alot
@iamusmanshabbir1422 жыл бұрын
innovated
@AmitKumar-sy1vp3 жыл бұрын
perfect, and u should have to take a better mic..that's all , thanks dude
@nikoo283 жыл бұрын
Thanks for the feedback. If you don’t mind can you please check the audio quality in my latest video. I have changed my mic. Does that sound nicer?
@AmitKumar-sy1vp3 жыл бұрын
@@nikoo28 ya that's seems better.
@yogeshk83233 жыл бұрын
some mistakes are there in the tutorial
@nikoo283 жыл бұрын
Can you please highlight them? I can correct them out.
@yogeshk83233 жыл бұрын
@@nikoo28 06:52 -in result array 22 was written twice. I know this is silly mistake. 10:00 -hash function is not explained properly , how the element will get inserted into correct bucket number.
@nikoo283 жыл бұрын
@@yogeshk8323 you can check out the hash function in the actual code on Github. The link is available in the description. I just wanted to focus mainly on the concept of bucket sort in this video. Thus, got limited with the explanation. Hope you understand. :)
@sandhyaavasthi24683 жыл бұрын
Which algorithm is used to sort element in the buckets
@nikoo283 жыл бұрын
you can use quick sort to sort the buckets individually
@07akashrasheed813 жыл бұрын
Good
@07akashrasheed813 жыл бұрын
It's best
@lakshrustagi5073 жыл бұрын
bhai internal sorting to batate 🤣
@nikoo283 жыл бұрын
use any sorting algorithm to sort internally. Quick sort/counting sort can work