Menu
Question Index
...


Write a program to identify a time slot where you can get maximum number of participants.
The time slot returned should be in first employee's time zone.

Input (List) Output (String)
First : Mahesh EST [07:00 - 11:00, 13:00 - 15:30]
Second : Srinath GMT [07:00 - 11:00, 13:00 - 15:30]
Third : Narayana CST [07:00 - 11:00, 13:00 - 15:30]
Fourth: Mobeen IST [07:00 - 11:00, 13:00 - 15:30]
Fifth: Siva SGT [07:00 - 11:00, 13:00 - 15:30]
09:30 - 10:00
First : Raju EAT [06:00 - 08:00, 16:00 - 19:30]
Second : Rani SGT [07:00 - 07:30, 16:00 - 23:00]
Third : Sneha IST [15:00 - 19:30]
Fourth : Latha GMT [15:00 - 19:30]
19:00 - 19:30
First : Ram SGT [05:00 - 07:00, 13:00 - 18:30]
Second : Krishna EDT [07:00 - 07:30, 15:00 - 17:00, 18:00 - 19:00]
Third : Antony CST [06:00 - 07:30, 20:00 - 23:00]
15:00 - 15:30
First : Chiranjeevi JST [13:00 - 15:30]
Second : Charan EAT [07:00 - 11:00, 13:00 - 15:30]
Third : Pavan CST [13:00 - 15:30]
Fourth : Arjun IST [02:00 - 04:00, 13:00 - 15:30]
Fifth : Aravind SGT [07:00 - 11:00, 13:00 - 15:30, 19:00 - 19:30]
Sixth : Nagababu EST [05:00 - 07:00, 13:00 - 15:30]
19:30 - 20:00

class MaximumNumberOfParticipants

{    public static void main(String s[])
    {
        Employee mahesh = new Employee("Mahesh", "EST");
        mahesh.freeTimes.add("07:00 - 11:00");
        mahesh.freeTimes.add("13:00 - 15:30");
        Employee srinath = new Employee("Srinath", "GMT");
        srinath.freeTimes.add("07:00 - 11:00");
        srinath.freeTimes.add("13:00 - 15:30");
        Employee narayana = new Employee("Narayana", "CST");
        narayana.freeTimes.add("07:00 - 11:00");
        narayana.freeTimes.add("13:00 - 15:30");
        Employee mobeen = new Employee("Mobeen", "IST");
        mobeen.freeTimes.add("07:00 - 11:00");
        mobeen.freeTimes.add("13:00 - 15:30");
        Employee siva = new Employee("Siva", "SGT");
        siva.freeTimes.add("07:00 - 11:00");
        siva.freeTimes.add("13:00 - 15:30");
        List employees = new ArrayList();
        employees.add(mahesh);
        employees.add(srinath);
        employees.add(narayana);
        employees.add(mobeen);
        employees.add(siva);
        System.out.println("Maximum number of participants are available in " + findFirstMeetingTime(employees) + " slot");

    }


public static String findFirstMeetingTime(List<Employee> employees) {
//Write code here to identify a time slot where you can get maximum number of participants.
return result;
}

//If required write any additional methods here.
}
class Employee {

String name;
String timeZone;
ArrayList<String> freeTimes = new ArrayList<String>();

public Employee(String name, String timeZone) {
this.name = name;
this.timeZone = timeZone;
}
}

Doubts

Problems

Topic: Locale Class In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App