Meta | Facebook USA | E4 | Phone Screen
Anonymous User
1859

My interviewer was super irritated with me since the phone screen was at 5pm and he wanted to just get out of it. He didn't ask to introduce myself just started with the first problem and then the second one.

  1. Maximum distance between two nodes in a binary tree: https://leetcode.com/problems/diameter-of-binary-tree/

    He then modified the question to maximum distance between two nodes in a tree (parent node can have more than 2 children). This was easy as I just modified it into a list of nodes, rather than using left, right.

    1. Create an iterator, that has K lists of maximum N lengths. All the lists are already sorted. Also needed to build functions like hasNext() and int next(): I bruteforce my way for this problem, combined all the sorted lists to an array integer and then sorted it again, he asked me the complexity of my code and it was O(N*K + Log(NK)).

Right after I told my complexity we were out of time and he was like bye!

Still haven't heard from the recruiter but I guess might be a reject.

Comments (6)