


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The solutions to test #1 of the cpsc 212-302 course. It includes the analysis of a pseudo-code segment, the execution of a code segment, the insertion of values into an avl tree, the traversals of a binary tree, the conversion of a binary tree to a k-ary tree, the completion of a java method, and explanations of radix sort and balanced/self-adjusting trees.
Typology: Exams
1 / 4
This page cannot be seen from the preview
Don't miss anything!



int i = 8N; while(i>0) { for (int j=0; j<i-1; j++) M[i] += A[i]B[j]; // statement # i -= 8; } // while
for (int i=0; i<10; i++) { int x = (i%2==0)?((i>5)?(i10):(i5)):((i>6)?(i+15):(i-13)); System.out.println(i + ": " + x); } // i
children of F: E _ children of E: A B children of B: C Q children of A: H K children of Q: G _ children of H: I J
infix: y = 2 / b * c ^ - 5 + d + - ( z * c ) ^ - 5 ; postfix: _____________________________________________________ quadruples:
public boolean evalInput(String input) { StringTokenizer in = new StringTokenizer(input); } // evalInput
~ 5 _ t ^ t5 t6 t ~ t7 _ t