To the all the comments saying 'slow down': DO NOT slow down Derek! One of the main reasons I watch Derek's videos is for the quick pace. He doesn't waste my time. If it is too fast for you, simply use the pause button, or re-watch a section. Derek your videos are unique and extremely valuable to those who love your style and pace. Don't change the velocity or dumb them down. Been watching your vids for years now. They are some of the best on KZbin!
@Chrobar9 жыл бұрын
+Uncle Kenta Exactly this ^ People that need to slow down can always pause. Those who want more fast paced, it's perfect.
@faustofeles89129 жыл бұрын
+Uncle Kenta LOL I even watch Derek's videos at x1.5 speed, like you said, the pace is what brings me back every time!
@christopherstephens72789 жыл бұрын
+Uncle Kenta +1. Derek's videos are great to watch @2x speed. Just listen to what he says then go look at/play with the code after. If you still don't get it then watch it again @2x.
@chinatownbus7 жыл бұрын
I can't watch his videos because he can't make the time to explain in a normal way how to code. Why should I waste my time having to pause and rewind every few seconds when there are better videos where the teacher actually explains what he is doing and not using auto complete and copy paste for so much of the program. Sad!
@paulaxa17 жыл бұрын
in my college i had a teacher who died unfortunately.. He was the best in my opinion. He was teaching us so fuckin fast we were always rushing. He explained something then was like "go fast on eclipse and implement this you have 2 minutes".. We were rushing to implement it then when we asked a question he was saying "google it now fast fast". If we couldn't make the correct google search to find this he would come and help us type the correct search, never give us straight answer.. Sometimes even before we could finish the implementation he was like "STOP!!!" and continued doing the next thing he had to teach.. A normal person would say this way of teaching is not good because he was rushing, but i believe the exact opposite. With him i was learning so fast and i could remember everything. After his death the next teachers were still good but slow.I preferred him.. I guess it also depends on the student. In his class there was no fuckin chill, just fast programming.
@derekbanas12 жыл бұрын
Thank you for taking the time to watch them. I know I'm a little guy on KZbin and I appreciate that people are giving my videos a watch :)
@allama95064 жыл бұрын
I know it has been 7 years but the people are thankful that they have your videos my good sir :)
@samuelnelson94634 жыл бұрын
@@allama9506 you were the first reply on a comment seven years old, and I'm the second. Great video Derek, humble man.
@zacharycollins220910 жыл бұрын
I have literally learned Java my first language, and have decided to pursue a career in computer science because of you. Realize that it took a lot of your time to make these, but thank you. Means a lot to a lot of people!
@derekbanas10 жыл бұрын
Zachary Collins Thank you for the wonderful compliment :) I wish you all the best in your future!
@segintendorocks8 жыл бұрын
This guy is a freaking boss at explaining hash tables and hash functions. Unfortunately I found it towards the end of the semester for my data structures class but I will be using these videos in the future. Thanks a lot dude!
@derekbanas8 жыл бұрын
Thank you very much :) I wish I could have helped sooner
@consumingserpent47114 жыл бұрын
@@derekbanas 3 years later and your videos are helping me the same way they helped the guy above me! Good work, man!
@derekbanas12 жыл бұрын
Thank you. I do this because I enjoy it. I'm just happy more people are watching. I remember the days when i'd upload a video and nobody would watch it for a week. Thank you for watching :)
@BelieveB237 жыл бұрын
I have to agree with the comments about not slowing down. And I'm one of the ones that has to pause and rewind. But I do when I need to. You have always been extremely thorough. It's not like you leave things out. You're one of the very best out there. Probably top 1%.
@cborrero200011 жыл бұрын
Awesome tutorial, after reading many articles on the Internet and even Java Books about what were hash tables for, I finally understand their logic and mechanics clearly with your example, and the pictures at the beginning were fundamental for this. Also I understood why they always talk about efficiency when referring to hash tables and hash code. You nailed it. Thank you so much Derek.
@derekbanas11 жыл бұрын
Thank you :) I make these videos with collaboration with those that are watching them at the time. I had some people tell me that they would be easier to follow if they were in one file. That is why I did it that way. You guys pretty much control everything I do
@derekbanas12 жыл бұрын
You are very welcome :) I am covering pretty much everything a person needs to be a great programmer. Lately I have been covering what are considered the most complicated topics. If you make it through these videos everything else will be easy
@zebrockson3 жыл бұрын
this video has just helped me so much i’m in second year doing computer science. thank you for this, 8 years going strong!
@rushidesai28367 жыл бұрын
Your displayStack function blew me away! Respect.
@derekbanas7 жыл бұрын
Thank you :) I'm glad it helped
@rushidesai28367 жыл бұрын
I am participating in Google Kickstart coding test. Any tips from your side?
@derekbanas7 жыл бұрын
Check these out if you haven't already code.google.com/codejam/past-contests#kickstart
@rushidesai28367 жыл бұрын
Thank you Derek!
@derekbanas12 жыл бұрын
Thank you :) Screen Capture : Camtasia 2 ( I used QuickTime Player until OS X Lion broke it ) Editing : iMovie Presentation : Keynote Up until a year ago I did everything on a Mac mini that cost less than $200 with all the software included
@itaispiegel-p1h10 жыл бұрын
Probably one of the best channels on KZbin to learn Javan and programming in general.
@derekbanas10 жыл бұрын
Thank you :)
@alaslipknot12 жыл бұрын
i started Java 3 months ago using a book (french one) and i managed to make a simple game but then i discovered your Chanel, i was watching that game tutorial you made and then found myself going through all your Java playlist since the 1st video, and i was like " :O !! " there is a TONS of basic things that i don't even know that they exist, that book didn't talked about them at all, i feel like a fool now because i bought it but i feel so luck finding your videos ^_^ thank you very much sir
@derekbanas11 жыл бұрын
You're very welcome :) I'm doing my best. Thank you for the kind comment!
@derekbanas11 жыл бұрын
Thank you very much :) I have found being able to help so many people all over the world to be more gratifying then most anything I've ever done! Thank you for giving my videos a chance
@derekbanas11 жыл бұрын
Thank you :) Im very happy that my video was able to explain the topic.
@derekbanas12 жыл бұрын
Everything great we have all came from some person in the past that decided to experiment. Since most every question can be answered now I can't think of a skill that is more important to strengthen than that
@derekbanas11 жыл бұрын
That was just a what if scenario. It was an example. Sorry about the confusion.
@alimomeni477711 жыл бұрын
You are an incredible teacher, and the fact that you do this for free is divine! Thank you!!
@derekbanas12 жыл бұрын
When this month ends I will immediately start with Android, so to be ready it will be good to have an understanding of java under your belt.
@123japanuser12 жыл бұрын
ಹಲೋ ಕೋಚ್ ಆತ್ಮೀಯ, ಹ್ಯಾಷ್ ಟೇಬಲ್ ಯೋಜನೆಗಳ ಒಂದು ಪ್ರಮುಖ ಭಾಗವಾಗಿದೆ. ಇದು ತುಂಬಾ ಉಪಯುಕ್ತ ಎಂದು ಕಾಣಿಸುತ್ತದೆ. ನೀವು ಎಲ್ಲಾ ಪ್ರಾಮಾಣಿಕ ಧನ್ಯವಾದಗಳು. ಕೇರ್ ತೆಗೆದುಕೊಳ್ಳಿ.
@derekbanas11 жыл бұрын
You should always use javas included data structures unless you need something custom. The compiler will optimize the code for you if you do that.
@derekbanas12 жыл бұрын
No I truly am amazed that regular old people discovered all of the things we use every day. The idea that people like Tesla and Newton ever existed amazes me. I'm pretty amazed by the world in general
@derekbanas12 жыл бұрын
The whole idea for doing these videos is to teach how the data structures work while also teaching logic you can use to create custom data structures. I'm doing my best to teach everything a CS student would learn in college
@animeforlife15054 жыл бұрын
Best video ever for Implementing Hash Tables. Thanks a lot.
@derekbanas4 жыл бұрын
Thank you :) Happy I could help
@maebedotme10 жыл бұрын
It should be %30, since the size is 30 and you want a max index of 29. 29%30 = 29 but 30%30 = 0.
@derekbanas12 жыл бұрын
I have many more coming. I'll get them out as quickly as possible. I'm glad you like them :)
@derekbanas12 жыл бұрын
It amazes me that some guy in the past came up with all this stuff
@derekbanas12 жыл бұрын
I'm going to cover trees next and graphs. I may pause at some point because I want to start android at the beginning of next month. I know java is in high demand in the us, but I don't know about the requirements of big employers. I decided I preferred working as a consultant many years ago. C and C++ are definitely great languages to learn and are also in demand for the work I do
@Polarwhite435 жыл бұрын
you are the reason for my survival in my System Dev with Java course thanks man!
@derekbanas5 жыл бұрын
Happy I could help :)
@anilkurmi596611 жыл бұрын
Great work Derek, You are changing the world by providing these tutorial. It's so simple and easy to learn by these videos. thanks lot.
@weyderwarr9 жыл бұрын
How does the nested loop 08:20 affect efficiency in this case? was that only there for teaching purposes?
@amirmohg13194 жыл бұрын
the 2 types of comments: 1.People complaining about how quickly he's teaching. 2.People complaining about the first type of comments.
@derekbanas12 жыл бұрын
Anything that doesn't contain duplicates and doesn't need to be ordered is a great candidate for a hash table. I'll cover more on hash tables and storing nonnumeric data in the next video. I'm not done yet
@ShehaazSaif11 жыл бұрын
Thank you very much!!!! I think after watching your videos I will be a Java expert! You are the best!!!
@derekbanas11 жыл бұрын
You're very welcome :) I'm doing my best to cover everything.
@felixchess511 жыл бұрын
First tutorial I've seen from you but definitely not the last. You are pretty good! Thank you
@derekbanas12 жыл бұрын
Yes I've been getting some help lately in the real world. It is great to be doing videos on a regular basis again :) I didn't know I told you about that. Sometimes I think I talk to you guys more than I do with my family
@jeffwei11 жыл бұрын
OMG already at 1:44 I already understand more about hash tables than I learned in 4 years of undergrad studying CS. Thank you once again. Just one minor error I noticed - shouldn't you % by 30 instead of 29, since your array size is 30? Otherwise, you will never fill array index 29, since any multiple of 29 goes to 0. The only reason it's filled on your table is because of collisions (I mean, I suppose you could % by any number less than the size of your array, but it just seems like a waste).
@derekbanas11 жыл бұрын
Thank you :) Yes not that many people know about me. I'm glad you enjoyed it
@dr3amtTwitch9 жыл бұрын
If you guys want Derek to slow down, just pause the video :) Then resume when you got it. Thanks for these AWESOME videos! No bullshit talking, always on the freakin' spot! Love it man! Keep it up
@derekbanas9 жыл бұрын
+Dr3amT Thank you :) Many more are coming.
@peteoo94678 жыл бұрын
+Dr3amT slow down != pause
@MelvinJ88 жыл бұрын
+Tosy Pitarz You try the speed option located in the settings?
@matrixlnmi16910 жыл бұрын
Derek , thanks alots , you don't know how much you are doing favor to people , through sharing tutorial . This would definitely useful for carrier . Please keep on
@derekbanas10 жыл бұрын
You're very welcome :) Many more videos are coming
@JakeDevGames3 жыл бұрын
One of the nicest coding tutorials ive watched. Thanks!
@vic93806 жыл бұрын
At 8:56'', line 49, arrayIndex %= arraySize. Why? If I see collision, couldn't I simply ++arrayIndexHash and find the next available spot ? I'm not seeing why we have to increment and then modulo.
@derekbanas12 жыл бұрын
That would really be amazing :) Either way I enjoy my little community because everyone is so nice
@Vortigon10 жыл бұрын
Love your Videos! You are a legend to help so many people!
@derekbanas10 жыл бұрын
Richard Clark Thank you for the kind compliment :)
@MrGforce8311 жыл бұрын
Brilliant tutorial! Have just covered this stuff in Uni but its nice to see clear examples and be able to pause and go back over the bits I didn't catch the first time round! Keep up the great job!
@elblonko11 жыл бұрын
This is really well explained and your presentation with a link to the code is extremely easy to follow. Appreciate the post
@mahmoudaggour889 жыл бұрын
Reaaaaally complicated and very fast explanation for beginners
@yfchina14310 жыл бұрын
hi , derek question. on 10:30 u said the size of the hashing table has to be twice as large. i dont understand this. could you explain it more on it?
@derekbanas10 жыл бұрын
yufan huang To make collision resolution quicker
@yfchina14310 жыл бұрын
so if i do 15 space hashing table with 15 items in it, it will work but it wont work as fast as the 30s?
@derekbanas11 жыл бұрын
Thank you very much :) While the HashTables and HashMaps are different in java, code wise they are the same. I know that can be confusing and I don't know why Java named them that way
@Arthur121373 жыл бұрын
you deserve my Data Structure teacher's salary
@derekbanas3 жыл бұрын
I wish :) Thank you for the compliment
@clevershadowyy12 жыл бұрын
What software do you use to make the video? It's really nice, both the content and the presentation!
@shobyvinci10 жыл бұрын
Such a great teacher! Love to watch your videos before going to the class!
@derekbanas10 жыл бұрын
Shoaib Sheikh Thank you :) I'm glad you like them.
@vincentphilippe_184 жыл бұрын
This is perfectly clear ! Your video succeed to keep it simple despite the complexcity of the subject !
@satyaprakashgalipelli376611 жыл бұрын
This tutorial is simply superb. I like the way you explained.
@derekbanas11 жыл бұрын
You're very welcome :) Im going to cover advanced algorithms soon
@derekbanas11 жыл бұрын
Great I'm glad I could help. Sorry about the error. I should have caught that
@Bedwards110111 жыл бұрын
How would you find the keys that had collisions? for example 624 % 29 = 15 but index 15 stores 415. 624 is actually located in index 29
@ivenousername8 жыл бұрын
Wonderful video, much more informative than my lectures at University. Thank you.
@derekbanas8 жыл бұрын
Thank you very much :)
@alankaradas12 жыл бұрын
Your efforts for this online training is definitely incredible. I truly believe the day is near that when you upload a new video, the views will stop at 303 for some time. xD
@alankaradas12 жыл бұрын
I really hope you keep making these great tutorials. You are one of the best online tutors.. Been following you after I watched Design patterns of yours and I made the right choice. Looking forward for the more complex Hash table examples and many more Java tutorials. :)
@GabbeSWE010 жыл бұрын
Just wanted to thank you, you're awesome and have teached me a lot :) I wish our Java university teacher was as good as you!
@derekbanas10 жыл бұрын
Thank you very much for the kind compliments :)
@ericcartmansh11 жыл бұрын
Great channel Derek! Really love your presentation style. What tool do you use for the transitions between slides and videos? Its really smooth!
@josephfernando48677 жыл бұрын
at 2:12...how does it go directly to that location ...what is the science behind that...doesnt it have to search that hash value in the array one by one...??
@spacepod1009 жыл бұрын
at 8:45, can anyone explain why he uses a while loop. Would an if statement not work? Thanks
@AP-eh6gr9 жыл бұрын
+spacepod100 no coz there could be MULTIPLE CONSECUTIVE != -1s there.....only a loop will suffice
@kevinnegron25276 жыл бұрын
In this case, there were no collisions. Was the while loop in findKey necessary? just want to clear that up thanks!
@RatherBAnon10 жыл бұрын
As always Derek, amazingly useful. Keep up the good work, friend! Your videos are always the first I recommend whenever someone needs a concept explained in java!
@derekbanas10 жыл бұрын
Thank you very much for that. I greatly appreciate you telling others about me :)
@jeremiahnji67 жыл бұрын
Just a great video T_T. Thank you for sharing. Only thing that you mentioned that has probably changed is ensuring that the hash table is at least 1.5 larger than the amount of n-elements.
@derekbanas11 жыл бұрын
Check out the code I have in the description for this video. It is probably a typo
@JovinoRibeiro8 жыл бұрын
Dude. You rock! It is fun watching your videos.
@derekbanas8 жыл бұрын
Thank you :) I'm happy they help
@lalokullo11 жыл бұрын
Derek I have a question. What is the difference of using Java's implemented hashtable and making our own, like in your example? Ty.
@YoungKrieger12 жыл бұрын
Wow, it gets more and more interesting.. I better get my ass stop procrastinating, and watch and learn the stuff in Java Video tutorials playlist soon, so I am comfortable with this algorithms tutorials..
@derekbanas11 жыл бұрын
Thank you :) I'll be covering C and C++ very soon
@IOSAppCrazy6 жыл бұрын
Question at 8:51 I can’t for the life of me understand why we mod our arrayIndex variable by our arraySize again to get it to equal 0. Wouldn’t that just infinitely loop at index 0 if that index isn’t our default value? To me it looks like the method is finished the line before that.
@AdamParkerJ11 жыл бұрын
really enjoy your tutorials. Very well done and straightforward. Thank you!
@derekbanas11 жыл бұрын
Thank you :)
@derekbanas12 жыл бұрын
I promise the first video in April will be on android :)
@derekbanas11 жыл бұрын
Thank you :) I'm happy you liked it
@derekbanas11 жыл бұрын
Thank you :) I'm only nice because so many people have been very nice to me
@84aniket10 жыл бұрын
Very nice tutorial, helped me a lot. Just one feedback, if you try to search the value other than the one present in the HashTable for example "111", it will go in an infinite loop as you keep incrementing the arrayindex and when it reaches the end of array it again starts from 0.
@derekbanas10 жыл бұрын
Thank you :) Yes I thought I pointed that out, but I may have missed it since I was working out of my head. Sorry about that.
@84aniket10 жыл бұрын
Derek Banas Thank you for the hard work.
@ericcamacho11867 жыл бұрын
I have a questions, how is the while loop breaking in the case were the hashTable has no empty indexes and the key is not found in the hashTable (theArray). Wouldn't the loop just keep looping over and over even after reaching the end of the array?
@TheLINGS2411 жыл бұрын
I have a question. In the comments above hashFunction2 you have mentioned we do not want more than 15 elements but we actually have 30 elements. Why is that? Am I missing something?
@xcxcxc3450011 жыл бұрын
Thank you. I really mean it! I love you videos! Thank you for taking your time to create so clear videos.
@vincentjonany450010 жыл бұрын
Hey Derek, I read somewhere about the better solution for the collision: Link the elements of the same index using linkedlist... What do you think?
@derekbanas10 жыл бұрын
Vincent Jonany Yes I demonstrate that later in the tutorial series
@Djinn6673 жыл бұрын
So would this also work with a hash table or hash map?
@derekbanas11 жыл бұрын
Sedgewick’s book is probably the best in my opinion
@joshcastaneda319211 жыл бұрын
Great stuff, sir! I have a bit of clarification to ask for/point out, so you're presupposing that the number of elements in the hash table won't exceed 30, correct? It seems that if you try to insert a 31st element, you'll run into an infinite loop? Just before the 9:00 min mark, that while loop won't break if the array is full, correct?
@EibeMandel7 жыл бұрын
What would I do without your videos
@derekbanas7 жыл бұрын
I'm very happy that you enjoy them :D
@EibeMandel7 жыл бұрын
Derek Banas can't believe you're replying to comments on a video that's almost 5 years old. You're awesome!
@bahhooooo9 жыл бұрын
The problem is not the speed, but his intonation :) But as others said, it's always right on spot!
@derekbanas9 жыл бұрын
+bahhooooo Thank you :)
@Hackaprende10 жыл бұрын
Hi Derek, great tutorial as always, thanks!!. Excuse me in the findKey function I have a doubt, when the HashTable is full theArray[arrayIndexHash] will never be equal to -1, then if I put a value that is not in the hashtable it will keep inside the while loop and will never get out. How to solve this?
@derekbanas10 жыл бұрын
Almaral Engineering I decided that that would never happen because I know I'll always try to make the maximum size of my hash table at least twice as big as the data it will contain for reasons like collision minimization.
@Hackaprende10 жыл бұрын
ok very well then I will follow this advice, thanks :)
@dhireshjain509511 жыл бұрын
Great video!:) Just one doubt though. Why do you go back to the starting of the hash table to find the key (If you reach the end of the array)? I couldn't think of why the key would be found anywhere before the index value " key% 29 ".
@skazis8711 жыл бұрын
At 12:21 - why did you put this line: arrayIndexHash %= arraySize; I think that arrayIndexHash is a local variable and the 2nd time we search for a key-value, we will create it and initialize it 2nd time and so on. There is no need to reset it if it reaches arraySize's (instance variable) value.
@derekbanas11 жыл бұрын
Thank you :) I edit the videos with iMovie
@simrandotdev12 жыл бұрын
Can you please tell Sir what All topics you will be covering in Algorithms. And I have one question can we become proficient in Algorithms and get good jobs in US market if we do not know C or C++ well but are good in others such as Java and Python and Algorithms ?? Please answer me to this query of mine :-) And Thanks for your tutorials they are just awesome ....
@mattg96012 жыл бұрын
What confuses me with java hastables, correct me if im mistaken. Is it utilizes a key to find an index, but it finds an index to store the key given. So it isn't a true key-value pair as the key is used to find the index to place the key. So the key-value is the same thing. Where in other languages hashtables are viewed differently.
@carloscardenas624211 жыл бұрын
Useful and dynamic video Derek. Thank you for sharing it.
@derekbanas11 жыл бұрын
Thank you and you're very welcome :)
@havinhphu93318 жыл бұрын
Thanks, man.Your tut get direct to the point. I love that.
@derekbanas8 жыл бұрын
Thank you :)
@Priyam_Gupta9 жыл бұрын
in the search function, you are searching till while(array[index]!="-1"). won't it be infinite loop if the array is completely filed. There wouldn't be any -1 value in the filed array?
@derekbanas9 жыл бұрын
+Priyam Gupta I made it a rule that the array has an upper limit. If I wanted to expand it I would create a new array. That is how normal arrays work.
@elenenify6 жыл бұрын
it will be infinitely loop if the key is not in the hash table
@AeriaIistic9 жыл бұрын
6:11 Can someone explain what he means by "...we don't plan to have more than 15 numbers total in the array"? Because later, he adds 30 numbers into it.
@derekbanas9 жыл бұрын
+Kawaii Sorry about the confusion. I made a hypothetical comment. "Now let's say we have to hold values between 0 & 999 but we never plan to have more than 15 values in all." I meant to have 30 values from the beginning.