Amazon Interview Question

One was based on variable sliding window. Other was based on graph prim's algo.