Data Structures Fundamentals
Test your knowledge of computer science data structures including trees, graphs, stacks, queues, hash tables, and more
Questions
Which of the following data structures falls under the category of a 'dictionary'?
- Hash Table
- Hash
- Tree
- Linked List
When using a hash, which function will give you the parent of the entry with index i?
- Decimal division, i / 2
- Multiplication, i * 2
- Integer division, i / 2
- Multiplication, i * 2 + 1
A vector (an indexed, growable list) would most likely be implemented on top of which of these structures?
- Hash Table
- Linked List
- Tree
- Stack
If you have an empty stack that can contain letters, and you push (in order) these letters onto it, what order will they be in when you pop them off? 't' 'a' 'p'
- There is no way to tell
- t,a,p
- a,t,p
- p,a,t
If you have a empty queue that can contain letters, and you enqueue (in order) these letters into it, what order will they be in when you dequeue them? 'm' 'a' 'r'
- 'r' 'a' 'm'
- 'a' 'r' 'm'
- 'm' 'a' 'r'
- There is no way to tell
Which of the following could best be described by the graph structure?
- A GUI (Graphical User Interface)
- Algebraic problems
- Given a word, finding its definition
- Roads connecting cities
If you have a sorted, balanced binary tree with 15 elements in it, how many steps, maximum, will it take you to decide whether an element is present in the tree?
- 3
- 4
- 15
- depends on computer
If you wanted to make sure that the close-parenthesis (the ')' characters) match the open-parenthesis (the '(' characters) in a mathematical expression, which data structure could help you?
- Stack
- Tree
- Hash Table
- Linked List
Which of these is true about a set?
- The elements are kept in order
- They can only hold numbers
- There are no duplicates
- All of these
Modern filesystems, like ReiserFS and XFS, use which structure to organize their data for efficient access?
- Lists
- Tables
- B- Trees
- B+ Trees