How would you solve a problem that requires finding the most efficient solution rather than just a working one?