Pinterest interview question

3 ML questions and 1 leetcode question.