Два раза в неделю - один раз в неделю каждый запускает стирку, перекладывает в сушку, делит вещи и складывает свои
Один раз в неделю каждый выкидывает мусор, один раз в неделю каждый относит мусор на дальнюю мусорку (стекло или пластик)
| class Solution { | |
| // temp: input array | |
| // n: size of array | |
| //Function to rearrange the array elements alternately. | |
| public static void rearrange(int arr[], int n){ | |
| for (int i = 0; i < arr.length; i++) { | |
| int index = i; | |
| int next = arr[index]; | |
| if (next < 0) continue; |
| class Timer { | |
| long startTime = System.currentTimeMillis() | |
| static Timer start() { | |
| new Timer() | |
| } | |
| long timeSpent() { | |
| System.currentTimeMillis() - startTime | |
| } |
| package com.doublescoring.socredit | |
| class Customer { | |
| List<Order> orders; | |
| } | |
| class Order { | |
| List<String> products; | |
| } |
| package com.doublescoring.socredit; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import java.util.stream.Collectors; | |
| public class Test { | |
| public static void main(String[] args) { | |
| int size = Arrays.asList(new OrderList(Arrays.asList(new Order(Arrays.asList("гавно", "шлак"))))) | |
| .stream() |
| package com.doublescoring.socredit.domain; | |
| import java.util.concurrent.ExecutorService; | |
| import java.util.concurrent.Executors; | |
| public class Event { | |
| private ExecutorService executor = Executors.newCachedThreadPool(); | |
| private Runnable errorHandler; | |
| private Runnable successHandler; | |
| private final Object lock = new Object(); |