Facebook phone screen (and question)
Anonymous User
523

2 questions:

  1. reversing layers of tree (for even depth normal order, for odd - reverse), return as list of layers
  2. lowest common anscestor of 2 nodes for unordered binary tree

Solved and coded both, but rejected.
Want to ask, what can be cause: maybe not communicating well? I not asked constraints (but solved in linear time so it doesn't much matter) and not looked for example in a hurry in second task and started solving for ordered binary tree but then reformed, also in hurry forgot about parameters in function but then added. Can these facts be cause for rejecting?

Comments (3)