384 points · by prabhupant · 7y ago · 33 comments
[1] https://users.cs.duke.edu/~ola/bubble/bubble.html
[2] also bubble sort is shapeist and efficiency-shaming :)
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.
It reminds me of the visualisation of different sorting algorithm (with sound): https://youtu.be/kPRA0W1kECg
The radix tree didn't seem to work for me.
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.
Just because you think you haven’t used or didn’t use, doesn’t mean it’s not useful. First, maybe I didn’t use because I didn’t know how to use. Second, maybe there is more to the world than me and the probability of folks needing info is 95% and I’m in the 5% of the lucky/unlucky.
I try to learn things based on curiosity and intrinsic value that I try to estimate. The act of learning is valuable as a system and I’m frequently surprised by putting unlikely topics together.
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
I've seen people not realize they are implementing a linked list when they are working in a language like PHP or Python, have an array of objects, and those objects contain indexes or keys to other objects in the array.
Similarly, I've seen people not realize they have trees. For instance, suppose a program generates some kind of report. The report has multiple sections. Somewhere in there you might have a
report = [section1, section2, ..., sectionN]
to represent the report. But section can have subsections, so that section1 could actually be section1 = [section1_1, section1_2, ...]
and so one with subsubsections and more.That final 'report' variable references a tree, but a lot of people wouldn't notice because they didn't have to make a node structure with child and parent pointers and maintain those pointers manually.
Someone writes those libraries. Not you, apparently.
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.
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.
Extremely useful learning aids :)
I remember back in the day when they were Java applets :)