I have added the compare to method which will automatically be used when
you call the method sort() for the array.