Amazon Interview Question

Solve 2 hackerrank problems (not really a question) ?