Pinterest (SDE Toronto)
Anonymous User
5317

Few of the questions asked were:

  1. Given parent-child relationships, determine the family members which have no parents or one parent. (Solved it but can you guys tell me which LC question this is closest to?)

  2. Given a set of pins with attributes (pin id, height), write a function that takes the argument 'k' (determining the number of columns) and inserts the pins such that every pin goes into a column with least consumed height. If there is a tie then insert into the left most column. (What would be the best way to solve this? I used a priority queue)

I had used Python as my programming language.

Comments (12)