Hacker News new | ask | show | jobs
by 1arity 3952 days ago
there are so many algorithms in so many different areas.

it may work to start with just one area, an area that is close to something you already are making or solving, and then, literally, in searching for algorithms for that pick the shortest one and solve a small implementation of it.

in finding a reference implementation i found the following helpful :

-- pick code in the same language you will be writing your version in.

-- if you can, find and read the original paper ( try searching google scholar ) describing the algorithm, these are often clearly written and explain the motivating situations that led to the way the algorithm was constructed.

finally some example short algorithms from a few areas and favorites of mine :

string processing :

-- LZW algorithm

-- longest common subsequence algorithm

tree graph processing :

-- post order depth first search

list processing :

-- group elements in an array into sub arrays of length k

integer processing :

-- change of radix algorithm ( change a mumber from the given base ( 10 ) to base 2 ( or even to other bases as well ) )

most of all, just work your way through step by step, like the algorithms your are making.

1 comments

Thanks for the advice! Trust me, i haven't heard of some of the things you have mentioned above. So it definitely helps!