Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a program to implement merge intervals for a hardcoded list of intervals.

Hard

Problem Statement

Create a program to implement merge intervals for a hardcoded list of intervals.

Sample Input

Intervals: [[1, 3], [2, 6], [8, 10], [15, 18]]

Sample Output

Merged Intervals:
[1, 6]
[8, 10]
[15, 18]

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
using System; using System.Collections.Generic; class MergeIntervals { static void Main() { // Merge overlapping intervals } }
Log in or sign up to run or submit your code.Log inSign up
Input
Intervals: [[1, 3], [2, 6], [8, 10], [15, 18]]
Expected Output
Merged Intervals:
[1, 6]
[8, 10]
[15, 18]