The design of algorithms is both an art and a science.
The best way to solve a problem is to think about it in a different way.