Pinterest Interview Question

Basic Machine Learning question. Need deep understanding.