Pinterest interview question

Basic Machine Learning question. Need deep understanding.