Amazon Interview Question

Basic time complexity problems, alongside some simple coding