CPSC 220
Fall 2006
HW 2: More Review and BubbleSort
- Convert the following expressions as indicated.
- Infix to postfix: ((g + a) * (b + c)) / (d % f)
- Postfix to infix: a b c / + e f g d % * - +
- Write Java code to add an element x to the end of a linked list.
Assume that LinearNode variable front refers to the front of
the list.
- L&C Exercise 10.5
- Carefully read the section on Bubble Sort (p 348-350). Trace the
execution of method bubbleSort on an array holding the values below.
Show the values of variables position, scan and data
as you proceed
through the loop.
6 3 8 4 1