Amazon interview question

Implement a least recently used cache, invert a binary tree