Train Platform Allocation

Train Platform Allocation problems involve assigning trains to platforms such that no two trains occupy the same platform at the same time. You need to find the minimum number of platforms required.

10Worksheets
200+Practice Questions
IntermediateDifficulty
2-3 hoursHours to Master

Introduction to Train Platform Allocation

Train Platform Allocation problems involve assigning trains to platforms such that no two trains occupy the same platform at the same time. You need to find the minimum number of platforms required.

Prerequisites

Interval scheduling Overlap detection Greedy algorithm Platform allocation
Why This Matters: Train Platform problems appear in 2-3 questions in Railways RRB and 1-2 in SSC exams. They test resource allocation and scheduling.

How to Solve Train Platform Allocation Problems

1

Step 1: List all trains with arrival and departure times

2

Step 2: Sort all events (arrivals and departures) by time

3

Step 3: Sweep through events: +1 for arrival, -1 for departure

4

Step 4: Track maximum concurrent trains

5

Step 5: This maximum = minimum platforms needed

Pro Strategy: Use sweep line algorithm: sort all arrival and departure events. Count active trains. Maximum active = minimum platforms.

Example Problem

Example: Trains: T1(9:00-10:00), T2(9:30-11:00), T3(10:00-12:00), T4(11:00-13:00). Minimum platforms? Solution: Step 1: Events: 9:00(+1), 9:30(+1), 10:00(-1,+1), 11:00(-1,+1), 12:00(-1), 13:00(-1) Step 2: Sweep: 9:00→1, 9:30→2, 10:00→2 (after -1 then +1), 11:00→2, 12:00→1, 13:00→0 Step 3: Max concurrent = 2 Answer: 2 platforms

Pro Tips & Tricks

  • Treat departure as -1, arrival as +1
  • If arrival = departure of another, can use same platform (departure before arrival usually)
  • Sort by time; if tie, departures before arrivals
  • Maximum value during sweep is answer

Shortcut Methods to Solve Faster

Minimum platforms = maximum number of overlapping intervals
For sorted intervals, use min-heap of end times
Platforms = size of min-heap at peak

Common Mistakes to Avoid

Counting arrivals only (ignoring departures)
Not handling ties correctly (departure should come before arrival)
Using sum instead of maximum
Forgetting that trains can share platform if times don't overlap

Exam Importance

Train Platform Allocation is an important topic for various competitive exams. Here's how frequently it appears:

SSC CGL
1-2 questions
BANKING PO
1-2 questions
RAILWAYS RRB
2-3 questions
INSURANCE
1-2 questions

Ready to Master Train Platform Allocation?

Start with Worksheet 1 and work your way up to expert level! Each worksheet includes:

20 practice questions
Detailed solutions
Step-by-step explanations
Start Practicing Now