Amazon interview question

Regular DS and ML stuff, nothing fancy.