Conference Facility Resource Optimization

Company: Capital one case study

Difficulty: medium

Problem Statement

Conference Facility Resource Optimization Problem Description N teams want to use one conference facility. Team i has people[i] members and needs the room from time starting[i] to time ending[i] , both ends included. The room holds one team at a time, so two teams can both be served only when their time ranges do not share a single instant: one must end strictly before the other starts. Every team that is not given the room loses all of its members' sessions. Choose the teams to serve so that the number of people left out is as small as possible, and report that number. Function Description Complete the Optimization(n, people, starting, ending) function. It takes the team count and the three arrays and returns the smallest possible number of people left out. Input Format The first line contains the integer N . The second line contains N integers, the values of people . The third line contains N integers, the values of starting . The fourth line contains N integers, the values of ending