hw3 array sorting