@@ -0,0 +1,568 @@
+// https://community.topcoder.com/stat?c=problem_statement&pm=13125%0A%0Aimport java.util.LinkedList;%0Aimport java.util.Queue;%0A%0Apublic class WakingUpEasy %7B%0A%09public static int countAlarms(int%5B%5D volume, int S) %7B%0A%09%09Queue%3CInteger%3E volumeValues = new LinkedList%3CInteger%3E();%0A%09%09for (int volumeValue : volume) %7B%0A%09%09%09volumeValues.add(volumeValue);%0A%09%09%7D%0A%09%09%0A%09%09int alarmCount = 0;%0A%09%09while (S %3E 0) %7B%0A%09%09%09int firstVolumeValue = volumeValues.peek();%0A%09%09%09S -= firstVolumeValue;%0A%09%09%09alarmCount++;%0A%09%09%09volumeValues.remove();%0A%09%09%09volumeValues.add(firstVolumeValue);%0A%09%09%7D%0A%09%09%0A%09%09return alarmCount;%0A%09%7D%0A%7D%0A

Create WakingUpEasy.java