Amazon Interview Question

Asked one LC easy, one med, and a hard