Google Onsite Interview Senior Swe kirkland
1442
  1. Given a dom for a html doc. implement the find function. the idea is to traverse through the tree to find text nodes, and search for the pattern and return the node in the lsit

Inode
{
IList GetAllChildren();

string GetText();

INode GetParent();
}
The query can be across text nodes as show in the below example Hello there should return 2 nodes.
Ex :
div
textnode /b
Hello There

2a. Given a sorted array, convert it into minimum height BST.
2b. Given K lists implement HasNext and Next() methods.
Ex: Given lists a, b ,c, the first next() will return first element of a, then b, and c..and back to a.

  1. Given a tree with exclude list return a list of clone tree with excluded parts

Ex : Given a tree like and exclude list contains C and D. the return will be a cloned tree containing AB, G, H , E. This is a simple use case but you can imagine more complex scenario.
A
B C
D E
G H

  1. design a platform like ticketmaster or stubhub
  2. Design a system that can handle a billion clicks a day and provide the following information
    a. top K clicks
    b. clicks/day
Comments (5)