COS 226 Final: COS 226 Princeton Final Spring 12

29 views15 pages

Document Summary

This test has 14 questions worth a total of 100 points. The exam is closed book, except that you are allowed to use a one page cheatsheet (8. 5-by-11, both sides, in your own handwriting). No calculators or other electronic devices are permitted. Give your answers and show your work in the space provided. Write out and sign the honor code pledge before turning in the test. I pledge my honor that i have not violated the honor code during this examination. Estimate the running time of the operation (in seconds) as a function of n and use tilde notation to simplify your answer. Circle your answer. (b) consider the following data structure for representing a ternary search trie in java. public class tst { private node root; // root of tst private class node { private char c; private node left, mid, right; private value val;