Amazon Interview Question

The most challenging project for the bq. Two super trivial array related coding questions. One code segment for me to do complexity analysis.