code: private static int[] subset(final int[] electrons) {
          int[] vs = new int[electrons.length];
          int n = 0;
  
          for (int i = 0; i < electrons.length; i++)
              if (electrons[i] >= 0) vs[n++] = i;
  
          return Arrays.copyOf(vs, n);
      }
docs: Obtain a subset of the vertices which can contribute {@code electrons}
  and are allowed to be involved in an aromatic system.
  
  @param electrons electron contribution
  @return vertices which can be involved in an aromatic system