This preview shows page 1. Sign up to view the full content.
Unformatted text preview: b. All integers in the linked list loop -c. integer in the array - d. The sum of all even integers in the array - ) 5) (7.21) clear () - , no changes (7.22) add() - , no changes (7.23) add( int newPosition, T newEntry) - , no changes (7.24) remove (int givenPosition) - , no changes ) Algorithm X is , so Algorithm Y is , so 0) a) loop # 1 - times b) loop # 2 - times c) loop # 3 10 times So, the order is going to be), which is ) which is ) 19) 20) a. b. c. Sprinted runs yards, while the football player runs. By subtracting, we will get that football player runs yards more that sprinter....
View Full Document
- Spring '11