[prev] 14 [next]

Exercise #2: Pseudocode

Implement the following pseudocode instructions in C

  1. A is an array of ints

    ...
    swap A[i] and A[j]
    ...
    

  2. S is a stack

    ...
    swap the top two elements on S
    ...