Question: I need to return the smallest numbers (can be more than one) that occur in an array.

```
given [1,1,2,3,3,4]
expected [1,1]

given [8,8,2,3]
expected [2]

```

Answer: 
What about this?

```
a = [1, 1, 2, 3, 3, 4]
min = a.min
a.select { |i| i == min }
 => [1, 1]

```
Here's one way to solve the problem:

1. Find the smallest number
2. Count how many times it appears
3. Generate an array with the solution instead of selecting elements in the input

Snippet:

```
input = [1,1,2,3,3,4]
highest = input.min
[highest] * input.count(highest)

```