ACSL
2007 - 2008          American Computer Science League             Contest #4
                                             Junior Division
1. Data Structures
   What is the depth of the binary search tree for
                        WILLIAMSHAKESPEARE?
2. Data Structures
   Given an initially empty stack and the following sequence of operations,
   what would be the next POPPED element?
   PUSH(M), PUSH(A), PUSH(C), POP(X), PUSH(B), POP(X), POP(X),
   PUSH(E), PUSH(T), PUSH(H), POP(X)
3. Prefix-Infix-Postfix
   Evaluate the following prefix expression :
   Note: all numbers are single digits in the expression
                     +/+452–41*2+84
4. Prefix-Infix-Postfix
   Translate the following infix expression to postfix:
                       A
                         +C∗B 2
                       B
5. What Does this Program Do?
   How many unique letters are there in the output of the following program
   after execution?
   N$="" M$=""
   A$="MISSISSIPPIMISSOURIRIVERS"
   FOR I = 1 TO (LEN(A$) - 1) STEP 2
     IF MID$(A$, I, 1) = MID$(A$, I + 1, 1) THEN N$ = N$+ MID$(A$, I, 1)
     IF MID$(A$, I, 1) > MID$(A$, I + 1, 1)
        THEN N$ = N$ + MID$(A$, I + 1, 1) + MID$(A$,I, 1)
   NEXT I
   FOR J = 1 TO LEN(N$)
     IF ((MID$(N$, J, 1)>"E") AND (MID$(N$, J, 1) <= "M"))
        THEN M$ = M$ + MID$(N$, J, 1)
   NEXT J
   PRINT M$
   END