Google Interview Question

Implement a Data Structure Algortihm puzzle