Amazon interview question

LC easy-medium + ml basics