7 ms·
Data Structure Visualizations (2011)
- nift 8y agoInteresting site! Always cool to see these things visualised. It reminds me of the visualisation of different sorting algorithm (with sound): https://youtu.be/kPRA0W1kECg https://youtu.be/kPRA0W1kECg
- winrid 8y agoVery cool! Always fun to watch all the different tree implimentations.
- abhishekjha 8y agoQuery regarding Preparing for interviews: Is it expected from me to know implementations for all of them with all the posdible operations?
- gamanoid 8y agoIn some way yes, especially when looking at comparing their time/memory complexities and weighing tradeoffs. A good starter would be to go through the classic: Cracking The Coding Interview book as a form of guide. Also there are a few sites out there that offer practical contextual problems to solve in preparation. Interview questions vary and how stringent they will be with it would also vary.
- anonytrary 8y agoAll of them? No. The basic ones? Yes. You should know how to implement a stack, queue, linked list, doubly-linked list, heap, and binary tree. You should also know how to represent a tree in binary form. You should know how to balance a binary tree. You should know the time and space complexity of common operations on those structures. Do they expect you to build a skip-list from scratch on a whiteboard? Probably not, and they shouldn't. If you're very familiar with the basics, then implementing more advanced structures is a matter of doing some basic Googling.
- zimpenfish 8y ago> You should know how to implement a stack, queue, linked list, doubly-linked list, heap, and binary tree. Not once in the last 20 years have I had to use one of those that wasn't already implemented for me. Nor, I suspect, have most people. It's like requiring a delivery driver to know the internals of engines - completely unnecessary to getting the day to day work done.
- kriro 8y agoIt's still useful to understand data structures and algorithms on a conceptual level. Even if all you ever do is use premade ones it's going to be nontrivial to pick the correct ones in some cases if you never thought about the costs/benefits they come with. And I wouldn't call it premature optimization either, just picking sane defaults. Also...and that's just a personal opinion, I think it's good practice to show an interest beyond black box use when you work with stuff. Poking around in standard libraries can be great fun :D
- PunchTornado 8y agoyes, for a driver is also useful to know how an engine works. would you put it in an interview for uber or to get a driving license? no plus you forget that stuff really quickly if you don't use it. I can barely remember half of those from Uni.
- chii 8y agoBut if you were tasked with designing a vehicle, it would behoove you to know how the engine worked, rather than only using it as a black box.
- zimpenfish 8y agoThat depends - it's entirely possible to design and build vehicles using black box engines. What you might mean is "designing an optimal vechicle"? But for most people, they're basically working on simple CRUD stuff which doesn't need to be supra-optimal etc. (I could make all my internal code supra-optimal, write all my own data structure code, handcraft some assembly, etc. but it would be beyond pointless since 99% of the time it takes to do stuff is in the database server.)
- bradleyjg 8y agoA interviewer that asks you to implement a non-trivial data structure is a bad interviewer that should feel bad about himself. Unless you are going for a job on the BCL team or something. However, you definitely should be familiar with all the basic and many of the intermediate data structures, their asymptotic behaviors (bonus points if you can say something about their cache friendliness), and where you might use them.
- anonytrary 8y agoI was a bit annoyed that the visualizations require you to enter a number, then press a button, which triggers the input field to clear and disables input until the current animation is done. So if you wanna see a quick progression of building a linked list, you have to click, type, press button, repeat. It'd be neat if they queued up comma separated inputs so you could actually watch an entire sequence unfold.
- DyslexicAtheist 8y agomaybe it's time to mark bubble-sort with a latin-cross (deprecated) too[1][2] [1] https://users.cs.duke.edu/~ola/bubble/bubble.html https://users.cs.duke.edu/~ola/bubble/bubble.html [2] also bubble sort is shapeist and efficiency-shaming :)
- DyslexicAtheist 8y agoQuickSort with Hungarian (Küküllőmenti legényes) folk dance: https://www.youtube.com/watch?v=ywWBy6J5gz8 https://www.youtube.com/watch?v=ywWBy6J5gz8
- rafascar 8y agoThis is amazing
- jancsika 8y agoYou know, in some cultures I'd assume a computer scientist paid a bunch of folk dancers, slapped numbers on them, and and taught them this pattern to have a laugh with other computer scientists. But knowing Hungarians, I bet all these folk dancers have math/physics/compsci degrees and had to draw straws to decide whose interpretation of quicksort to choose.
- DyslexicAtheist 8y agoI picture them all during break time playing with their rubik cubes
- amelius 8y agoHow well can it visualize arbitrary graphs of various types (trees, DAGs, undirected graphs, cyclic graphs, ...)?
- dang 8y ago2013: https://news.ycombinator.com/item?id=6928904 https://news.ycombinator.com/item?id=6928904 2015: https://news.ycombinator.com/item?id=10183811 https://news.ycombinator.com/item?id=10183811 2017: https://news.ycombinator.com/item?id=14064865 https://news.ycombinator.com/item?id=14064865 https://news.ycombinator.com/item?id=15480517 https://news.ycombinator.com/item?id=15480517
- olooney 8y agoSome very nice ones in here: AVL and Red/Black trees, especially the rotation step. I also liked it when the code shows up on the upper left and you can see it stepping through line-by-line, such as the Fibonacci example. The radix tree didn't seem to work for me.
- elderK 8y agoMan, I'll always have a soft spot in my heart for these visualizations. Extremely useful learning aids :) I remember back in the day when they were Java applets :)