Amazon Interview Question

Interview 1: Sliding window, trees Interview 2: Trees, Union Find