Facebook | Phone | Max Path Sum & Min Groups
Anonymous User
2998

Location: London

Hello,
I was contacted by recruiter via LinkedIn. He set up a phone screen in 2 weeks.
I was asked 2 questions:

  1. https://leetcode.com/problems/binary-tree-maximum-path-sum/ I managed to solve it. Although there was one small bug, which I spotted and fixed.
  2. I have not been able to find this question on leetcode. There are N people. We have information about interests of each person. Your task is to find minimum number of groups that these people can be placed into so there are no any 2 persons who share the same interests in one particular group e.g. {"A":['lit', 'math'], "B":['math'], "C":['sci']} A and B cannot be in the same group but C can go either with A or B. Each person can have infinitely large number of interests. So answer for this example will be 2.

I spent quite some time figuring out how to solve the problem. I proposed a brute force solution but it seemed that the interviewer was not very happy about it but then he said me to code my solution anyway. Unfortunately I didn't have enough time to solve the second problem. So he said that the time was up and asked me if I had any questions.

In 2 days I received a standard rejection email. I feel really dumb.

Comments (20)