InterviewDigestInterviewDigest

OA Practice Workspace

Technical Interview2026-08-16

DSA questions based on trees, DSU, sliding windows, and quick sort

AI-Expanded — inferred from the question title, not from the original candidate report

Given a forest of trees represented as an array of edges, use a Disjoint Set Union (DSU) to group connected components and identify the size of each tree. Once the components are identified, extract the root values into a list, sort them using the Quick Sort algorithm, and finally apply a sliding window approach to find the contiguous subarray of sorted roots that has a sum closest to a target value K.

Context & Summary

Technical round focused on Data Structures and Algorithms, including topics like trees, DSU, sliding windows, and quick sort. Followed by a brief discussion about the candidate's projects.

💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.