Close
Topic list
Maximum meetings
EASY
10 mins
Greedy
Arrays
Topics (Covered in this problem)
Problem solved
Skill meter
Greedy
-
-
Arrays
-
-
Other topics
Problem solved
Skill meter
Strings
-
-
Matrices (2D Arrays)
-
-
-
-
Sorting
-
-
Binary Search
-
-
Stacks & Queues
-
-
Trees
-
-
Graph
-
-
Dynamic Programming
-
-
Tries
-
-
SQL
-
-
Binary Search Trees
-
-
Heap
-
-
Bit Manipulation
-
-
Solve problems & track your progress
Checkout your overall progress in every topic here
Become
Sensei
in DSA topics
Open the topic and solve more problems associated with it to improve your skills
Check out the skill meter for every topic
See how many problems you are left with to solve for cracking any stage. Score more than zero to get your progress counted.

# Maximum meetings

Contributed by
Anish De
Easy
0/40
Avg time to solve 10 mins
Success Rate 90 %
Share

## Problem Statement

#### You are given the schedule of N meetings with their start time Start[i] and end time End[i]. But you have only 1 meeting room. So, you need to tell the meeting numbers you can organize in the given room, such that the number of meetings organized is maximum.

##### Note:
``````The start time of one chosen meeting can’t be equal to the end time of the other chosen meeting. Also for the same end time, a meeting with a smaller index is preferred.
``````
Detailed explanation ( Input/output format, Notes, Constraints, Images )
##### Sample Input 1:
``````2
6
1 3 0 5 8 5
2 4 6 7 9 9
3
1 1 1
4 5 9
``````
##### Sample Output 1:
``````1 2 4 5
1
``````
##### Explanation For Sample Input 1:
``````For test case 1:
You can organize a maximum of 4 meetings. Meeting number 1 from 1 to 2, Meeting number 2 from 3 to 4, Meeting number 4 from 5 to 7, and Meeting number 5 from 8 to 9.

For test case 2:
As all meetings have the same start time, you can organize only 1 meeting in the room.
``````
##### Sample Input 2:
``````2
5
0 7 1 4 8
2 9 5 9 10
3
1 2 3
4 4 4
``````
##### Sample Output 2:
``````1 2
1
``````
Auto
Console