×

[–]jedidreyfus 56 points57 points  (4 children)

What about a whole course based on these. It would be the analog to Advanced Algorithms but for more of the SE crowd.

It would take a lot of work, but it would be cool if toy environments were built beforehand so that the students can actually use their implementations.

[–]The-flying-statsman 26 points27 points  (3 children)

Does anyone want to start an open-source project to make this a reality? It sounds good to me!

Edit: Guys who are interested, shoot me a PM, and we'll try and figure out some communication channels, I am excited about this!

[–]br_aquino 17 points18 points  (0 children)

I don't know, I think those are a little too much specific. For me, things like Recursive Greed Search have much more chance of you really have to implement one day.

[–]rpgoof 62 points63 points  (2 children)

+1 to implementing RSA. Partially because its the only one on here that I remember touching in college, but also because Cryptography was my favorite class. Extremely challenging stuff, but also extremely rewarding. We had to write a program to brute force RSA for part of our final exam, using a computationally realistic key size of course. Seeing my code actually work was one of my most satisfying moments in college.

[–]bsmith0 12 points13 points  (1 child)

I would say implementing AES falls in the same category.

More on the Computer Engineering side, building AES in C then in HDL is very cool.

[–]vwibrasivat 11 points12 points  (0 children)

Red Black Trees

"why does my brain hurt?"

"Because you've never used it before."

[–]krum 25 points26 points  (5 children)

> Treemap using Red Black Trees!

Naw, implement a map using B+ trees. B+ trees are the underlying index used for most databases. RB trees are just too easy.

[–]cthorrez 0 points1 point  (0 children)

If you want a lot of fun implement R trees or R* trees. They generalize B+ trees to arbitrary dimensions.

[–]TheBaxes 0 points1 point  (0 children)

I had to implement that for a class. It was a lot of fun and very rewarding, even if each block was just an array and not an actual block on disk.

[–]assface 0 points1 point  (2 children)

Naw, implement a map using B+-trees

I agree with you but the canonical spelling is "B+tree" without the hyphen.

[–]frankielyonshaha 7 points8 points  (0 children)

You should through in A* as well, it's THE algorithem for computer games development. It can even be used in AI systems like GOAP.

[–]PseudonymousDev 27 points28 points  (1 child)

Clickbait title, but I did enjoy reading this post. I'm not going to implement all of the ones I haven't already implemented, but I'll probably take a look at one or two.

[–]ukkoylijumala 15 points16 points  (0 children)

I agree, not just the title.... also phrasing like this:

Can’t miss this. This transformed our lives in ways we never thought possible.

I do enjoy this selection, but I think the title is absolute rubbish.

[–]shawnsingh786 6 points7 points  (0 children)

Can you do a post where you also talk about the basic algorithms that you stated you would skip?

[–]barsoap 2 points3 points  (0 children)

On the dynamic programming front, I'd like to add Knuth-Plass line breaking. The stuff that makes TeX look better than everything else.

(Before anyone gets stumped and confused: In the examples the words in the nodes of the graph on the right continue the sentence to the left of the graph)

Someone else mentioned A* with other's saying that it's one of the obvious things, OTOH Not everyone might know about this page. Useful to study even if it's just to follow the process leading from "here's how it works as presented in a paper" to "here's how you actually implement it well". The algorithm itself is simple, all the surrounding considerations, e.g. data structure selection, do benefit quite a lot from proper deliberation.

[–]cthorrez 2 points3 points  (2 children)

Got my MS in CS recently and the only one of these I've implemented is PageRank. 😀

[–]jhaluska 2 points3 points  (1 child)

I have a MS also. I've only implemented two of them in college. I have implemented some of the others out of college, and haven't even heard of some of them. I'm torn on this post, because while I love learning about algorithms, I hate click bait titles.

[–]wasabichicken 2 points3 points  (1 child)

I'll make a pitch for Huffman coding, the compression tech behind stuff like zip. I think it's a great little exercise that involves building and traversing binary trees. It's also well suited for learning essential stuff like recursion, and a good opportunity to learn a functional language (e.g. Haskell) or how to implement it in a functional style (e.g. with JS or Python).

Once implemented, grab a free copy of Lewis Carrol's "Alice" from Project Gutenberg (public domain, free of copyright), and see how much you can compress it. Now zip the text using some standard tool. Compare, marvel a little, and draw conclusions.

[–]WikiTextBot 1 point2 points  (0 children)

Huffman coding

In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding or using such a code proceeds by means of Huffman coding, an algorithm developed by David A. Huffman while he was a Sc.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".The output from Huffman's algorithm can be viewed as a variable-length code table for encoding a source symbol (such as a character in a file). The algorithm derives this table from the estimated probability or frequency of occurrence (weight) for each possible value of the source symbol. As in other entropy encoding methods, more common symbols are generally represented using fewer bits than less common symbols.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

[–]RomanRiesen 1 point2 points  (0 children)

I did 6 of them.

But you reminded me that I want to implement Viterbi since like 2 years!

[–]MedianPlusPlus 1 point2 points  (0 children)

All good to know, whether or not you ever need to use them.

[–]savvaspc 1 point2 points  (0 children)

I have implemented AVL trees and it was a really nice experience! Having to deal with all the nodes while debugging was a challenge. I've also implemented a disc merge sort for big files that don't fit in RAM and it was another great experience.

[–]earthpat 0 points1 point  (0 children)

Pairing heap

[–]tdashroy 0 points1 point  (0 children)

Nice post! I'd be interested in a similar list for the esoteric ones.

[–]blackkswann 0 points1 point  (0 children)

Great post!

[–]Holybananas666 0 points1 point  (0 children)

This is really cool. First time out of college I've felt an itch to write something out of work. Thanks!

[–]skazen 0 points1 point  (0 children)

Nice suggestions. I would add raft consensus to your list.

[–]merlinsbeers 0 points1 point  (3 children)

How does Bresenham's algorithm compare in performance to just interpolating to determine y as x is incremented?

[–]krum 3 points4 points  (2 children)

For one thing, Bresenham is fast on devices that don't have FPUs. It's also guaranteed to work if you need a "thick" line whereas using floats and interpolation you might get some kind of floating point error.

[–]philipwhiuk -2 points-1 points  (3 children)

Ridiculous title.

I have a degree and I’ve only done Bresenhams.

[–]br_aquino 7 points8 points  (1 child)

Congratulations for your degree, I hope you know that it's the very beginning.

[–]iamajs 0 points1 point  (0 children)

Agreed, we don't need click bait titles..

[–]programmingfriend -1 points0 points  (1 child)

RemindMe! 3 Days "has /u/saadmrb made more posts on reddit claiming weird things then deleting them when they don't get the feedback they desired on it. Additionally observe if this is a result of some sort of unique disposition."

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 3 days on 2020-04-08 21:20:50 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]_____no____ -2 points-1 points  (0 children)

Circle Drawing using Bresenham’s algorithm

Checked that one off at 8 years old...