Amazon Interview Question

LC easy-medium + ml basics