Question bank › Greedy
Dsa Greedy Easy

Road Construction

You are planning road construction along a series of segments given by their start and end points. Each segment has to be constructed in a way that overlappings are minimized. Input includes the total number of segments followed by their start and end points. Your task is to calculate the maximum number of segments that can be constructed without overlaps. Example input: 4 1 3 2 5 4 6 5 7 Output: 3

Key concepts

greedyconstructionintervals

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.