Question: ```css
.container {
max-width: 1170px;
margin: 0 auto;
}

.row::after {
    display: block;;
    content: "";
    clear: both;
}

.col {
    float: left;
}

.col-6 {
    width: 50%;
}

.content {
    font-size: 3em;
    text-align: center;
    color: #fff;

    background-color: green;
    width: 100%;
    height: 300px
}
```

```html
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
    <div class="row">

        <div class="col col-6">
            <div class="content">Half of container width</div>
        </div>

        <div class="col col-6">
            <div class="content green">The remaining part of the viewport 
horizontally
            </div>
        </div>
    </div>
</div>
</body>
</html>
```

I would like to achieve this effect where the first col-6 spans the first 50% of the container's width , and the second col-6 spans from 50% of the containers width to the end of the viewport. I'd like to put an image there, if it matters ( if absolute positioning must be used ).
Hopefully this is descriptive enough

Answer: 
```
class SmallestPositiveIntegerNotInArray {

    public int solution(int[] a) {

        HashSet<Integer> hashSet = new HashSet<Integer>();
        int smallInt = 1;

        for (int i = 0 ; i < a.length; i++) {
            hashSet.add(a[i]);                     
        }

         while (hashSet.contains(smallInt)) {
             smallInt++;
            }

        return smallInt;
    }
}

```
The easiest way is to sort the array, and iterate through, looking for the next element you'd expect if the positive ints are contiguous. The downside is that you have to destroy the ordering of the array (unless you copy the array and sort that).

```
Arrays.sort(a);
int expectedNext = 1;
for (int i = 0; i < a.length; ++i) {
  if (a[i] > 0) {
    if (a[i] != expectedNext) return expectedNext;
    ++expectedNext;

    while ((i+1) < a.length && a[i] == a[i+1])) {
      ++i;
    }
  }
}
return aa.length + 1;

```

A non-destructive way is to use a `BitSet` to record the numbers that are present, and then look for the first non-set bit (not including zero):

```
BitSet bits = new BitSet(a.length);
for (int aa : a) {
  if (aa > 0 && aa < a.length) {
    bits.set(aa);
  }
}
return bits.nextClearBit(1);

```