Uber SDE-1 Assessment 2025-October | Greedy Sorting | Registration System | Merge Intervals

Uber · Question · Posted Jun 2026

Question 1: Merge Intervals Problem Statement Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. Input Format The first line contains T - the number of test cases. For each testcase, the first line contains N, the number of intervals. The next N lines contain 2 integers each, representing the start and end of the interval. Output Format For ...

The full answer & interview discussion are available to premium members.

Log in Create a free account