Skip to content

Latest commit

 

History

History
6 lines (6 loc) · 480 Bytes

README.md

File metadata and controls

6 lines (6 loc) · 480 Bytes

Count-the-twos

The challenge: given one parameter, i.e. 23, from zero to 23, how many twos? (I have modified this considerably.) In my modifications, I wanted to show that I could:

  1. generate an ordered, random, and with no repeats array--with both positive and negative integers
  2. expand the range of numbers that could be possibly chosen
  3. convert a treeset to an int array, thus allowing for the method (countTwos) to check for how many twos occur within the array