Moody's Interview Question

Standard array algorithm questions