Example algorithms for first class in programming for EE students
My favorite example of the value of efficiency is Fibonacci number computation.
A naive programmer could use the recursive top-down solution, which takes exponential time. A bottom-up iterative solution, on the other hand, runs in linear time.