CPSC 220
Fall 2006
HW 2: More Review and BubbleSort

  1. Convert the following expressions as indicated.
    1. Infix to postfix: ((g + a) * (b + c)) / (d % f)

    2. Postfix to infix: a b c / + e f g d % * - +

  2. 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.

  3. L&C Exercise 10.5

  4. 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