LinkedIn | Seattle | PS+VO | Sr SDE
PS
Project description
BQ: You delivered something that you initially thought is definitely not possible.
1.) Return true if the number has a square root else False, Basically binary search from 1 to mid/2
2.) Given a graph of users, return the connection_path between them. Bob -> Alice -> Franck.. connection length is 2.
Follow up: What is Bob has multiple users or bob is a celeb and Frank is also a celeb
The idea was to start with bi directional BFS.
essentially minimize distance[node][some_neighbour] + distance[some_neighbour][destination]
VO
Round 1:
LCA of a BST and BT.
Round 2:
- You have a n-ary tree figure out the sequence in which leaves will fall.
For instance
A has children B and C
B had children D and E
Leaves will fall in the sequence : [(D, E, C), (B), (A)] Even though example if BT, but it can b an n-ary tree. Basically topological traversal but with outdegree
- Second question, same question as PS part 2. Distance between Bob and stuff. Same follow ups. Here the key is that you can also manipualte the Queue itself. As in you don't have to do FIFO, you can also manipulate the queue in the sense which nexteligible neighbour has minimum outgoing connections. Or may be use a heap, sorted by the number of connections of the node rather than traditional traversal.
Round 3: Technical Communication
My Project discussion
Round 4: Design Calendar
Round 5: HM round
My project discussion + a couple of BQ


