Java Hash Table

  Рет қаралды 450,946

Derek Banas

Derek Banas

Күн бұрын

Пікірлер: 435
@GungaLaGunga
@GungaLaGunga 9 жыл бұрын
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!
@Chrobar
@Chrobar 9 жыл бұрын
+Uncle Kenta Exactly this ^ People that need to slow down can always pause. Those who want more fast paced, it's perfect.
@faustofeles8912
@faustofeles8912 9 жыл бұрын
+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!
@christopherstephens7278
@christopherstephens7278 9 жыл бұрын
+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.
@chinatownbus
@chinatownbus 7 жыл бұрын
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!
@paulaxa1
@paulaxa1 7 жыл бұрын
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.
@derekbanas
@derekbanas 12 жыл бұрын
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 :)
@allama9506
@allama9506 4 жыл бұрын
I know it has been 7 years but the people are thankful that they have your videos my good sir :)
@samuelnelson9463
@samuelnelson9463 4 жыл бұрын
@@allama9506 you were the first reply on a comment seven years old, and I'm the second. Great video Derek, humble man.
@zacharycollins2209
@zacharycollins2209 10 жыл бұрын
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!
@derekbanas
@derekbanas 10 жыл бұрын
Zachary Collins Thank you for the wonderful compliment :) I wish you all the best in your future!
@segintendorocks
@segintendorocks 8 жыл бұрын
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!
@derekbanas
@derekbanas 8 жыл бұрын
Thank you very much :) I wish I could have helped sooner
@consumingserpent4711
@consumingserpent4711 4 жыл бұрын
@@derekbanas 3 years later and your videos are helping me the same way they helped the guy above me! Good work, man!
@derekbanas
@derekbanas 12 жыл бұрын
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 :)
@BelieveB23
@BelieveB23 7 жыл бұрын
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%.
@cborrero2000
@cborrero2000 11 жыл бұрын
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.
@derekbanas
@derekbanas 11 жыл бұрын
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
@derekbanas
@derekbanas 12 жыл бұрын
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
@zebrockson
@zebrockson 3 жыл бұрын
this video has just helped me so much i’m in second year doing computer science. thank you for this, 8 years going strong!
@rushidesai2836
@rushidesai2836 7 жыл бұрын
Your displayStack function blew me away! Respect.
@derekbanas
@derekbanas 7 жыл бұрын
Thank you :) I'm glad it helped
@rushidesai2836
@rushidesai2836 7 жыл бұрын
I am participating in Google Kickstart coding test. Any tips from your side?
@derekbanas
@derekbanas 7 жыл бұрын
Check these out if you haven't already code.google.com/codejam/past-contests#kickstart
@rushidesai2836
@rushidesai2836 7 жыл бұрын
Thank you Derek!
@derekbanas
@derekbanas 12 жыл бұрын
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-p1h
@itaispiegel-p1h 10 жыл бұрын
Probably one of the best channels on KZbin to learn Javan and programming in general.
@derekbanas
@derekbanas 10 жыл бұрын
Thank you :)
@alaslipknot
@alaslipknot 12 жыл бұрын
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
@derekbanas
@derekbanas 11 жыл бұрын
You're very welcome :) I'm doing my best. Thank you for the kind comment!
@derekbanas
@derekbanas 11 жыл бұрын
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
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) Im very happy that my video was able to explain the topic.
@derekbanas
@derekbanas 12 жыл бұрын
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
@derekbanas
@derekbanas 11 жыл бұрын
That was just a what if scenario. It was an example. Sorry about the confusion.
@alimomeni4777
@alimomeni4777 11 жыл бұрын
You are an incredible teacher, and the fact that you do this for free is divine! Thank you!!
@derekbanas
@derekbanas 12 жыл бұрын
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.
@123japanuser
@123japanuser 12 жыл бұрын
ಹಲೋ ಕೋಚ್ ಆತ್ಮೀಯ, ಹ್ಯಾಷ್ ಟೇಬಲ್ ಯೋಜನೆಗಳ ಒಂದು ಪ್ರಮುಖ ಭಾಗವಾಗಿದೆ. ಇದು ತುಂಬಾ ಉಪಯುಕ್ತ ಎಂದು ಕಾಣಿಸುತ್ತದೆ. ನೀವು ಎಲ್ಲಾ ಪ್ರಾಮಾಣಿಕ ಧನ್ಯವಾದಗಳು. ಕೇರ್ ತೆಗೆದುಕೊಳ್ಳಿ.
@derekbanas
@derekbanas 11 жыл бұрын
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.
@derekbanas
@derekbanas 12 жыл бұрын
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
@derekbanas
@derekbanas 12 жыл бұрын
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
@animeforlife1505
@animeforlife1505 4 жыл бұрын
Best video ever for Implementing Hash Tables. Thanks a lot.
@derekbanas
@derekbanas 4 жыл бұрын
Thank you :) Happy I could help
@maebedotme
@maebedotme 10 жыл бұрын
It should be %30, since the size is 30 and you want a max index of 29. 29%30 = 29 but 30%30 = 0.
@derekbanas
@derekbanas 12 жыл бұрын
I have many more coming. I'll get them out as quickly as possible. I'm glad you like them :)
@derekbanas
@derekbanas 12 жыл бұрын
It amazes me that some guy in the past came up with all this stuff
@derekbanas
@derekbanas 12 жыл бұрын
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
@Polarwhite43
@Polarwhite43 5 жыл бұрын
you are the reason for my survival in my System Dev with Java course thanks man!
@derekbanas
@derekbanas 5 жыл бұрын
Happy I could help :)
@anilkurmi5966
@anilkurmi5966 11 жыл бұрын
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.
@weyderwarr
@weyderwarr 9 жыл бұрын
How does the nested loop 08:20 affect efficiency in this case? was that only there for teaching purposes?
@amirmohg1319
@amirmohg1319 4 жыл бұрын
the 2 types of comments: 1.People complaining about how quickly he's teaching. 2.People complaining about the first type of comments.
@derekbanas
@derekbanas 12 жыл бұрын
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
@ShehaazSaif
@ShehaazSaif 11 жыл бұрын
Thank you very much!!!! I think after watching your videos I will be a Java expert! You are the best!!!
@derekbanas
@derekbanas 11 жыл бұрын
You're very welcome :) I'm doing my best to cover everything.
@felixchess5
@felixchess5 11 жыл бұрын
First tutorial I've seen from you but definitely not the last. You are pretty good! Thank you
@derekbanas
@derekbanas 12 жыл бұрын
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
@jeffwei
@jeffwei 11 жыл бұрын
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).
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) Yes not that many people know about me. I'm glad you enjoyed it
@dr3amtTwitch
@dr3amtTwitch 9 жыл бұрын
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
@derekbanas
@derekbanas 9 жыл бұрын
+Dr3amT Thank you :) Many more are coming.
@peteoo9467
@peteoo9467 8 жыл бұрын
+Dr3amT slow down != pause
@MelvinJ8
@MelvinJ8 8 жыл бұрын
+Tosy Pitarz You try the speed option located in the settings?
@matrixlnmi169
@matrixlnmi169 10 жыл бұрын
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
@derekbanas
@derekbanas 10 жыл бұрын
You're very welcome :) Many more videos are coming
@JakeDevGames
@JakeDevGames 3 жыл бұрын
One of the nicest coding tutorials ive watched. Thanks!
@vic9380
@vic9380 6 жыл бұрын
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.
@derekbanas
@derekbanas 12 жыл бұрын
That would really be amazing :) Either way I enjoy my little community because everyone is so nice
@Vortigon
@Vortigon 10 жыл бұрын
Love your Videos! You are a legend to help so many people!
@derekbanas
@derekbanas 10 жыл бұрын
Richard Clark Thank you for the kind compliment :)
@MrGforce83
@MrGforce83 11 жыл бұрын
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!
@elblonko
@elblonko 11 жыл бұрын
This is really well explained and your presentation with a link to the code is extremely easy to follow. Appreciate the post
@mahmoudaggour88
@mahmoudaggour88 9 жыл бұрын
Reaaaaally complicated and very fast explanation for beginners
@yfchina143
@yfchina143 10 жыл бұрын
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?
@derekbanas
@derekbanas 10 жыл бұрын
yufan huang To make collision resolution quicker
@yfchina143
@yfchina143 10 жыл бұрын
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?
@derekbanas
@derekbanas 11 жыл бұрын
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
@Arthur12137
@Arthur12137 3 жыл бұрын
you deserve my Data Structure teacher's salary
@derekbanas
@derekbanas 3 жыл бұрын
I wish :) Thank you for the compliment
@clevershadowyy
@clevershadowyy 12 жыл бұрын
What software do you use to make the video? It's really nice, both the content and the presentation!
@shobyvinci
@shobyvinci 10 жыл бұрын
Such a great teacher! Love to watch your videos before going to the class!
@derekbanas
@derekbanas 10 жыл бұрын
Shoaib Sheikh Thank you :) I'm glad you like them.
@vincentphilippe_18
@vincentphilippe_18 4 жыл бұрын
This is perfectly clear ! Your video succeed to keep it simple despite the complexcity of the subject !
@satyaprakashgalipelli3766
@satyaprakashgalipelli3766 11 жыл бұрын
This tutorial is simply superb. I like the way you explained.
@derekbanas
@derekbanas 11 жыл бұрын
You're very welcome :) Im going to cover advanced algorithms soon
@derekbanas
@derekbanas 11 жыл бұрын
Great I'm glad I could help. Sorry about the error. I should have caught that
@Bedwards1101
@Bedwards1101 11 жыл бұрын
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
@ivenousername
@ivenousername 8 жыл бұрын
Wonderful video, much more informative than my lectures at University. Thank you.
@derekbanas
@derekbanas 8 жыл бұрын
Thank you very much :)
@alankaradas
@alankaradas 12 жыл бұрын
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
@alankaradas
@alankaradas 12 жыл бұрын
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. :)
@GabbeSWE0
@GabbeSWE0 10 жыл бұрын
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!
@derekbanas
@derekbanas 10 жыл бұрын
Thank you very much for the kind compliments :)
@ericcartmansh
@ericcartmansh 11 жыл бұрын
Great channel Derek! Really love your presentation style. What tool do you use for the transitions between slides and videos? Its really smooth!
@josephfernando4867
@josephfernando4867 7 жыл бұрын
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...??
@spacepod100
@spacepod100 9 жыл бұрын
at 8:45, can anyone explain why he uses a while loop. Would an if statement not work? Thanks
@AP-eh6gr
@AP-eh6gr 9 жыл бұрын
+spacepod100 no coz there could be MULTIPLE CONSECUTIVE != -1s there.....only a loop will suffice
@kevinnegron2527
@kevinnegron2527 6 жыл бұрын
In this case, there were no collisions. Was the while loop in findKey necessary? just want to clear that up thanks!
@RatherBAnon
@RatherBAnon 10 жыл бұрын
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!
@derekbanas
@derekbanas 10 жыл бұрын
Thank you very much for that. I greatly appreciate you telling others about me :)
@jeremiahnji6
@jeremiahnji6 7 жыл бұрын
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.
@derekbanas
@derekbanas 11 жыл бұрын
Check out the code I have in the description for this video. It is probably a typo
@JovinoRibeiro
@JovinoRibeiro 8 жыл бұрын
Dude. You rock! It is fun watching your videos.
@derekbanas
@derekbanas 8 жыл бұрын
Thank you :) I'm happy they help
@lalokullo
@lalokullo 11 жыл бұрын
Derek I have a question. What is the difference of using Java's implemented hashtable and making our own, like in your example? Ty.
@YoungKrieger
@YoungKrieger 12 жыл бұрын
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..
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I'll be covering C and C++ very soon
@IOSAppCrazy
@IOSAppCrazy 6 жыл бұрын
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.
@AdamParkerJ
@AdamParkerJ 11 жыл бұрын
really enjoy your tutorials. Very well done and straightforward. Thank you!
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :)
@derekbanas
@derekbanas 12 жыл бұрын
I promise the first video in April will be on android :)
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I'm happy you liked it
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I'm only nice because so many people have been very nice to me
@84aniket
@84aniket 10 жыл бұрын
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.
@derekbanas
@derekbanas 10 жыл бұрын
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.
@84aniket
@84aniket 10 жыл бұрын
Derek Banas Thank you for the hard work.
@ericcamacho1186
@ericcamacho1186 7 жыл бұрын
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?
@TheLINGS24
@TheLINGS24 11 жыл бұрын
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?
@xcxcxc34500
@xcxcxc34500 11 жыл бұрын
Thank you. I really mean it! I love you videos! Thank you for taking your time to create so clear videos.
@vincentjonany4500
@vincentjonany4500 10 жыл бұрын
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?
@derekbanas
@derekbanas 10 жыл бұрын
Vincent Jonany Yes I demonstrate that later in the tutorial series
@Djinn667
@Djinn667 3 жыл бұрын
So would this also work with a hash table or hash map?
@derekbanas
@derekbanas 11 жыл бұрын
Sedgewick’s book is probably the best in my opinion
@joshcastaneda3192
@joshcastaneda3192 11 жыл бұрын
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?
@EibeMandel
@EibeMandel 7 жыл бұрын
What would I do without your videos
@derekbanas
@derekbanas 7 жыл бұрын
I'm very happy that you enjoy them :D
@EibeMandel
@EibeMandel 7 жыл бұрын
Derek Banas can't believe you're replying to comments on a video that's almost 5 years old. You're awesome!
@bahhooooo
@bahhooooo 9 жыл бұрын
The problem is not the speed, but his intonation :) But as others said, it's always right on spot!
@derekbanas
@derekbanas 9 жыл бұрын
+bahhooooo Thank you :)
@Hackaprende
@Hackaprende 10 жыл бұрын
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?
@derekbanas
@derekbanas 10 жыл бұрын
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.
@Hackaprende
@Hackaprende 10 жыл бұрын
ok very well then I will follow this advice, thanks :)
@dhireshjain5095
@dhireshjain5095 11 жыл бұрын
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 ".
@skazis87
@skazis87 11 жыл бұрын
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.
@derekbanas
@derekbanas 11 жыл бұрын
Thank you :) I edit the videos with iMovie
@simrandotdev
@simrandotdev 12 жыл бұрын
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 ....
@mattg9601
@mattg9601 2 жыл бұрын
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.
@carloscardenas6242
@carloscardenas6242 11 жыл бұрын
Useful and dynamic video Derek. Thank you for sharing it.
@derekbanas
@derekbanas 11 жыл бұрын
Thank you and you're very welcome :)
@havinhphu9331
@havinhphu9331 8 жыл бұрын
Thanks, man.Your tut get direct to the point. I love that.
@derekbanas
@derekbanas 8 жыл бұрын
Thank you :)
@Priyam_Gupta
@Priyam_Gupta 9 жыл бұрын
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?
@derekbanas
@derekbanas 9 жыл бұрын
+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.
@elenenify
@elenenify 6 жыл бұрын
it will be infinitely loop if the key is not in the hash table
@AeriaIistic
@AeriaIistic 9 жыл бұрын
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.
@derekbanas
@derekbanas 9 жыл бұрын
+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.
Java Hash Tables 2
17:53
Derek Banas
Рет қаралды 102 М.
Map and HashMap in Java - Full Tutorial
10:10
Coding with John
Рет қаралды 629 М.
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
Ozoda - Alamlar (Official Video 2023)
6:22
Ozoda Official
Рет қаралды 10 МЛН
Hash Tables and Hash Functions
13:56
Computer Science Lessons
Рет қаралды 1,6 МЛН
Stacks and Queues
16:15
Derek Banas
Рет қаралды 388 М.
Java Generics
52:23
Jakob Jenkov
Рет қаралды 5 М.
Hash Tables - Data Structures and Algorithms
20:16
Caleb Curry
Рет қаралды 39 М.
Understanding and implementing a Hash Table (in C)
24:54
Jacob Sorber
Рет қаралды 375 М.
HashTable vs HashMap vs Concurrent HashMap all kinds of Map implementations
41:26
Learn Hash Tables in 13 minutes #️⃣
13:26
Bro Code
Рет қаралды 415 М.
Java Sort Algorithm
19:12
Derek Banas
Рет қаралды 336 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 616 М.
How HashMap works in Java? With Animation!! whats new in java8 tutorial
15:29
Ranjith ramachandran
Рет қаралды 1 МЛН