I have had a hard time in interviews when interviews push me to optimize the proposed solution. What is the strategy to be followed so that one can see the redundant computations in the proposed code? How to come up with innovative solutions in on-site interviews?