Ad
  • Custom User Avatar

    Simple and complex! Your solution open my mind to study streams, u rock dude!

  • Custom User Avatar

    The code doesn't work in this test:

    import org.junit.Test;
    import static org.junit.Assert.assertEquals;

    public class SolutionTest {

    @Test
    public void simpleArray1() {
        assertEquals(2, getActualFor(1, 2, 1, 1, 1 , 1 ,1 ,1));
    }
    
    private int getActualFor(int... numbers) {
        return Solution.stray(numbers);
    }
    

    }