Back to front pageView on Hacker News (opens in a new tab)Ask HN: What's your favorite elegant/beautiful algorithm?733 pointsby algobuddy (on Hacker News)8 years agoComments (491) 209 threadsEarlier commentslastlegion8 years ago#Huffman Encoding.imranq8 years ago#Breadth first search is simple but effective[-]xyproto8 years ago1 reply#Memoizing the fibonacci function.todd88 years ago#Yeah that’s a great example of memoization. Also, the surprising: phi = (1 + sqrt(5))/2.0 def fib(n): return round(phi**n / sqrt(5))IloveHN848 years ago#ICP for 3d point cloud alignmentLoad more commentsAll comments shown.Couldn't load more comments. Check your connection and try again.
Ask HN: What's your favorite elegant/beautiful algorithm?733 pointsby algobuddy (on Hacker News)8 years ago
todd88 years ago#Yeah that’s a great example of memoization. Also, the surprising: phi = (1 + sqrt(5))/2.0 def fib(n): return round(phi**n / sqrt(5))
Comments (491) 209 threads
Earlier commentsAll comments shown.
Couldn't load more comments. Check your connection and try again.