Think like a compiler, and solve problems efficiently.