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:
- generate an ordered, random, and with no repeats array--with both positive and negative integers
- expand the range of numbers that could be possibly chosen
- convert a treeset to an int array, thus allowing for the method (countTwos) to check for how many twos occur within the array