
Asked in MindTickle
Ninja and His Meetings Problem Statement
Ninja has started a new startup with a single conference room available for meetings. Given an array/list MEETINGS
of consecutive appointment requests, Ninja must decide which meetings to accept. Since he requires a 15-minute break between meetings, he cannot accept consecutive requests.
The task is to figure out the maximum total booked minutes possible in the conference room for all meetings.
Example:
Input:
MEETINGS = [30, 15, 60]
Output:
90
Explanation:
Assuming meetings start at 12:00. The first meeting lasts for 30 minutes, ending at 12:30. Ninja requires a 15-minute break, rendering the next 15-minute meeting unfeasible. After resting, he can attend the subsequent 60-minute meeting. Thus, total booked minutes are 30 + 60 = 90.
Constraints:
1 <= T <= 102
1 <= N <= 5 * 103
0 <= MEETINGS[i] <= 105
andMEETINGS[i]
is a multiple of 15- Time Limit: 1 second
Input Format
The first line contains an integer ‘T’, indicating the number of test cases. Each test case consists of two parts:
An integer ‘N’ indicating the number of meetings.
N space-separated integers representing the duration of each meeting.
Output Format
For each test case, return the maximum number of minutes scheduled for meetings. Each result should be printed on a new line.
Note:
You are not required to print anything; just implement the function to return the answer.

Find the maximum total booked minutes possible in a conference room for all meetings with a 15-minute break between meetings.
Iterate through the list of meeting durations and calculate the maximum tot...read more
Top Software Developer Interview Questions Asked at MindTickle
Interview Questions Asked to Software Developer at Other Companies
Top Skill-Based Questions for MindTickle Software Developer


Reviews
Interviews
Salaries
Users

