Data Structures Fundamentals

Test your knowledge of computer science data structures including trees, graphs, stacks, queues, hash tables, and more

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following data structures falls under the category of a 'dictionary'?

  1. Hash Table
  2. Hash
  3. Tree
  4. Linked List
Question 2 Multiple Choice (Single Answer)

When using a hash, which function will give you the parent of the entry with index i?

  1. Decimal division, i / 2
  2. Multiplication, i * 2
  3. Integer division, i / 2
  4. Multiplication, i * 2 + 1
Question 3 Multiple Choice (Single Answer)

A vector (an indexed, growable list) would most likely be implemented on top of which of these structures?

  1. Hash Table
  2. Linked List
  3. Tree
  4. Stack
Question 4 Multiple Choice (Single Answer)

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'

  1. There is no way to tell
  2. t,a,p
  3. a,t,p
  4. p,a,t
Question 5 Multiple Choice (Single Answer)

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'

  1. 'r' 'a' 'm'
  2. 'a' 'r' 'm'
  3. 'm' 'a' 'r'
  4. There is no way to tell
Question 6 Multiple Choice (Single Answer)

Which of the following could best be described by the graph structure?

  1. A GUI (Graphical User Interface)
  2. Algebraic problems
  3. Given a word, finding its definition
  4. Roads connecting cities
Question 7 Multiple Choice (Single Answer)

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?

  1. 3
  2. 4
  3. 15
  4. depends on computer
Question 8 Multiple Choice (Single Answer)

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?

  1. Stack
  2. Tree
  3. Hash Table
  4. Linked List
Question 9 Multiple Choice (Single Answer)

Which of these is true about a set?

  1. The elements are kept in order
  2. They can only hold numbers
  3. There are no duplicates
  4. All of these
Question 10 Multiple Choice (Single Answer)

Modern filesystems, like ReiserFS and XFS, use which structure to organize their data for efficient access?

  1. Lists
  2. Tables
  3. B- Trees
  4. B+ Trees