Nagarro Interview Question

i was asked to optimize the solution I provided in coding round.

Interview Answer

Anonymous

May 17, 2015

i optimized it by taking few steps out of the loop and restructuring code.