Menu
Question Index
...


Write a program to identify the time when the bells will ring together next, given their ringing frequency.

Input (String, List) Output (String)
Jan 19 2013 09:55, [2, 5, 10] Jan 19 2013 10:05
Nov 14 2015 23:20, [14, 34, 28, 2, 4] Nov 15 2015 07:16
Feb 10 2012 02:20, [3, 21, 7, 9, 18, 22] Feb 11 2012 01:26
Aug 15 2013 08:23, [7, 3, 11, 1] Aug 15 2013 12:14

class CommonRingingTimeOfMultipleBells

{    public static void main(String s[])
    {
        ArrayList frequency = new ArrayList();
        frequency.add(2);
        frequency.add(5);
        frequency.add(10);
        System.out.println("Next Common Ringing Time is : " + getCommonRingingTime("Jan 19 2013 09:55", frequency));

    }


public static String getCommonRingingTime(String lastRungTime, List<Integer> frequencies) {
String result = null;
//Write code here to get the time when they will ring together next and assign to result.
return result;
}

//If required, write any additional methods here
}

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