Question types

Start with

Question limit

of 105 available terms

Advertisement Upgrade to remove ads
Print test

5 Written questions

5 Matching questions

  1. What is the Big O of inserting at the front of an array or an ArrayList?
  2. In a Cons list, first and rest have different types. What are they?
  3. With respect to linked lists, what does .set(idx, element) do?
  4. To compare against null, what should be used?
  5. What is inorder?
  1. a Replaces the element at the specified position in this list with the specified element.
  2. b an order of processing a tree in which the parent node is processed in between its children
  3. c O(N)
  4. d First can be any Object type, while rest is a Cons or null
  5. e == or !=

5 Multiple choice questions

  1. add and remove are O(N) for random positions, contains is O(N)
  2. O(N). Much, much better.
  3. It concatenates two lists to form a single list.
    (append '(a b c) '(d e)) = (a b c d e)
  4. ordering that can guarantee to terminate (go down to zero)
  5. getFirst, addFirst, removeFirst, getLast, addLast, removeLast are all O(1)

5 True/False questions

  1. What is a constructive function?A function that creates a new list, but does not modify the original list's arguments


  2. How can you find the Big O of a loop?The loop count times the Big O of the contents


  3. How many children can a node have?Any number


  4. What are the different representations of trees that we are concerned with for Novak's class?Binary trees, First-Child/Next-sibling, Linked lists, Implicit


  5. What is a parent?A kind of graph composed of nodes and links. It has one root node. Each node except the root has exactly one parent. All nodes are reachable from the root.