Removing unnecessary early exit, which reduces nesting
Removing unnecessary early exit, which reduces nesting

If the sample array is empty, the inner loop will run 0 times
anyway, so I'm not sure what the removed check accomplishes.
Removing the check reduces the amount of code nesting.

jstrait/beats,jstrait/beats