HACKER Q&A
📣 borneodataman

What interesting ways have you used a rare algorithm or DS in your work?


Just bored and curious. Hope to learn a new thing or two. My best was using an inverted binary tree to get line number from index count in a tree, for millions of string indices.


  👤 mikewarot Accepted Answer ✓
Long ago, I had a Motorola 68HC11 CPU with 512 bytes of EEPROM to store code in.... I had a pulse input that needed to be scaled to a different frequency, I ended up using a phase accumulator to build a phase locked loop, in about 40 instructions or so (looking back, it's hard to be sure)... when I was done, I had a machine that could adapt to a wide range of line speeds, physical offsets, amounts of glue to apply, patterns, etc., while accommodating fixed timing delays, all in 511 bytes.

👤 andersource
Not a rare algorithm, but used Dijkstra along with [0] to create a timelapse video from a sequence of videos. The Dijkstra was used to choose paths of most similar frames across videos to morph between.

[0] https://learnopencv.com/face-morph-using-opencv-cpp-python/


👤 rschachte
I wrote a lot of graph algorithms that track identity and help prevent fraud. I’ve used a lot of tree algorithms to map legacy schemas to new schemas. Algorithms are great. If you know them well, you can improve your work and move quicker. If you dont, you may often reinvent the wheel in a suboptimal way