What is your favorite algorithm and why?
What is your favorite algorithm and why?
I like Euclidean Algorithm. Solves metric crapton of problems in elementary number theory and basic abstract algebra.
Djikstra shortest path. it's a beautiful design.
BFS and DFS. Simple and quite useful!