NAME

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 sometimes called a boxed integer?
  2. What are the two fields of a cons cell called?
  3. What is a pointer (aka reference)?
  4. How many links does a node that isn't the root have coming into it?
  5. For reference types, what do == and != test?
  1. a The equality of pointer values (i.e. do they have the exact same data address in memory?)
  2. b Integer in Java, a record that has a class, has methods, can be pointed to and used in other structures.
  3. c car and cdr (original names), or first and rest.
  4. d Exactly one
  5. e The memory address of the beginning of a record, or block of storage

5 Multiple choice questions

  1. nothing; a sentinel is an extra node, usually at the front or end, that simplifies coding.
  2. A linked list links new elements onto the front of the list.
  3. a stack that keeps a fresh set of values for each variable in a stack frame
  4. It looks like an ordinary tree, but the right hand links all fall down and become horizontal.
  5. O(N)

5 True/False questions

  1. What does it mean for functions to share structure?It can only be computed when n is relatively small (for example, if the function is exponential)

          

  2. What is the term for items being inserted at the end of a queue?enqueued

          

  3. With respect to linked lists, what does .set(idx, element) do?The number of "things" in the linked list

          

  4. What does the function reverse() do to a linked list?It reverses a list in place by turning the pointers around.

          

  5. What is the Big O of accessing some element in the middle of an ArrayList?O(1)

          

Create Set