Amazon interview question

2 technical questions involving data structures.