(Queue<Integer> q)
| 6 | public class QuestionA { |
| 7 | |
| 8 | public static int removeMin(Queue<Integer> q) { |
| 9 | int min = q.peek(); |
| 10 | for (Integer v : q) { |
| 11 | if (min > v) { |
| 12 | min = v; |
| 13 | } |
| 14 | } |
| 15 | while (q.contains(min)) { |
| 16 | q.remove(min); |
| 17 | } |
| 18 | return min; |
| 19 | } |
| 20 | |
| 21 | public static void addProducts(Queue<Integer> q, int v) { |
| 22 | q.add(v * 3); |
no test coverage detected