Amazon Interview Question

LRU cache, Minimum spanning tree