Simple comparison between numbers given constraints see how many comparisons are true.
Anonymous
Sort the array basically answers the question, find where you start comparing and where you end, take the difference in the indexes.
Check out your Company Bowl for anonymous work chats.