Pinterest coding challenge