test passed - method defined for sorting an aray by the last letter