Amazon Interview Question

one was about optimizing a search algorithm, and the other involved manipulating arrays