Apple phone round

Anonymous User
2470
Jan 07, 2020

Date : 7 Jan 2020

Level : senior software engineer

Question :

Find the maximum age of the children for a given input generation.
How you build the family tree is upto you.

Defined a tree with person having pointers to all the his/her children. Did a BFS with max variable to hold the age of the person at that required generation. Spoke about the time and space complexity. The interviwerer was happy with it.

Comments (2)