Uber interview question

leetcode medium problem and an ml problem