14. Refer to the previous question. What happens if the item you are looking for is not in the list? 15. Why is sorting important? 16. What is considered one of the most inefficient sorts? 17. Refer to the previous question. Why then are we looking at this sort? Questions 18 through 22 refer to the Bubble Sort. 18. Where does the get its name? Bubble Sort 19. What elements are compared? 20. Refer to the previous question. What happens if these 2 elements are in the wrong order? 21. After 1 comparison pass is completed, what has been accomplished? 22. If there are elements in the array, how many comparison passes will be necessary? n 23. Look at program This program does not contain a complete Bubble Sort. Java1314.java. What is accomplished by this partial sort? 24. Look at program How would you make this program sort in order instead of Java1315.java. descending order? (Hint: It involves changing just 1 character.) ascending 25. Why would a swap method be declared private? 26. If finding the correct page in a 2000 page phone book can be done in tries using the 11 Binary Search, how many tries would it take for a 4000 page phone book? 27. For a to work, what must be true of the list? Binary Search
14. Refer to the previous question. What happens if the item you are looking for is not in the list? 15. Why is sorting important? 16. What is considered one of the most inefficient sorts? 17. Refer to the previous question. Why then are we looking at this sort? Questions 18 through 22 refer to the Bubble Sort. 18. Where does the Bubble Sort get its name? 19. What elements are compared? 20. Refer to the previous question. What happens if these 2 elements are in the wrong order? 21. After 1 comparison pass is completed, what has been accomplished? 22. If there are n elements in the array, how many comparison passes will be necessary? 23. Look at program Java1314.java. This program does not contain a complete Bubble Sort. What is accomplished by this partial sort? 24. Look at program Java1315.java. How would you make this program sort in descending order instead of ascending order? (Hint: It involves changing just 1 character.) 25. Why would a swap method be declared private? 26. If finding the correct page in a 2000 page phone book can be done in 11 tries using the Binary Search, how many tries would it take for a 4000 page phone book? 27. For a Binary Search to work, what must be true of the list?