Amazon Interview Question

Complexity of the online test