Desquared Interview Question

Algorithms involving array traversal and value manipulation.