5 Written Questions
5 Matching Questions
- What does the function append do to a linked list?
- What are the disadvantages of ArrayList?
- What should be used to test the equality of the contents or value of a reference type?
- What is random access?
- Describe how log(n) grows.
- a .equals()
- b It concatenates two lists to form a single list.
- c describes a data structure in which all accesses have the same costs
- d Slowly
- e add and remove are O(N) for randoms, contains is O(N)
5 Multiple Choice Questions
- The equality of pointer values (i.e. do they have the exact same data address in memory?)
- A data structure where each element has two fields: a link and contents
- A pointer to data
- Extensible Markup Language, it allows users to put tags around their data to describe what the pieces of data mean
5 True/False Questions
How many links does a node that isn't the root have coming into it? → Exactly one
What does it mean to divide and conquer? → To break down a large problem into two smaller problems, until the problem becomes easy
What is the term for items being removed from the front of a queue? → The right hand nodes all fall down
What is a link? → A directed pointer from one node to another
What are the advantages of LinkedList? → getFirst, addFirst, removeFirst, getLast, addLast, removeLast are all O(1)