[redacted]

I should mention here that number of elements can be from 1....10'000. And it has to be done as O(N)

I attempted at the problem like so,


public static int adjacencies(int[] A) {...