ThatQuiz Test Library Take this test now
Data structures
Contributed by: Bedford
  • 1. Data structures are a key component of computer science that enable efficient organization, storage, and retrieval of data. They provide a way to represent and manipulate data in a structured and logical manner, allowing for faster and more effective algorithms and programs. Common data structures include arrays, linked lists, stacks, queues, trees, and graphs, each with its own unique properties and uses. Understanding data structures is essential for software developers to solve complex problems, optimize performance, and design scalable systems. By choosing the right data structure for a given task, developers can improve efficiency, reduce time complexity, and enhance overall software quality.

    What is a linked list?
A) A group of data items of the same type
B) A data structure that allows elements to be accessed randomly
C) A data structure that can only store one type of data
D) A data structure where each element points to the next element in the sequence
  • 2. Which data structure uses the Last In, First Out (LIFO) principle?
A) Array
B) Queue
C) Stack
D) Linked list
  • 3. What is a binary tree?
A) A hierarchical data structure in which each node has at most two children
B) A tree data structure where each node can have unlimited children
C) A data structure where elements are stored in a sorted sequence
D) A data structure that can only store binary data
  • 4. Which data structure uses the First In, First Out (FIFO) principle?
A) Queue
B) Stack
C) Linked list
D) Binary tree
  • 5. What is an array?
A) A structure that can only hold numeric values
B) A sequential collection of elements, each identified by an index or key
C) A data structure that only allows elements to be added at the beginning
D) A data structure that cannot be resized once created
  • 6. Which data structure organizes data in a hierarchy of nodes?
A) Linked list
B) Queue
C) Array
D) Tree
  • 7. What is a hash table?
A) A table that contains only hash values
B) A data structure that maps keys to values for efficient lookup
C) A data structure that stores data in a random order
D) A structure used for hashing passwords
  • 8. Which data structure uses pointers to connect elements in a linear sequence?
A) Tree
B) Linked list
C) Array
D) HashTable
  • 9. What is a graph data structure used for?
A) Representing networks and connections between elements
B) Storing data in a sequential manner
C) Sorting elements in ascending order
D) Performing mathematical calculations
  • 10. What does the term 'abstract data type' (ADT) refer to?
A) A mathematical model for data types, where data is defined as a set of values and operations
B) A type of code abstraction used in software development
C) A programming language that is not specifically tied to any hardware
D) A type of encryption used for securing data
  • 11. In a priority queue, which element is removed first?
A) Lowest priority
B) Last inserted element
C) Highest priority
D) Random element
  • 12. In a heap data structure, what property is satisfied at every node?
A) Heap Property
B) Search Property
C) Tree Property
D) Balance Property
  • 13. What is a B-tree data structure used for?
A) Representing hierarchical networks of elements
B) Efficiently storing and accessing large amounts of data on disk
C) Processing elements based on priority levels
D) Storing and sorting numeric values sequentially
  • 14. Which data structure is commonly used for efficiently searching for words in a dictionary?
A) Heap
B) Queue
C) Trie
D) Stack
  • 15. What is a self-balancing binary search tree?
A) A binary search tree that automatically maintains balanced height during insertions and deletions
B) A tree that balances itself by randomly rearranging nodes
C) A tree that has a fixed height and cannot be adjusted
D) A search tree that only allows for binary data
  • 16. Which data structure allows you to access a list of elements using an index or key?
A) Linked list
B) Array
C) Stack
D) Queue
  • 17. What does a Trie data structure often store?
A) Strings
B) Integers
C) Floating point numbers
D) Matrices
  • 18. In a queue, which operation adds an element to the rear end?
A) Enqueue
B) Dequeue
C) Push
D) Pop
  • 19. Which data structure is used for implementing a priority queue?
A) Heap
B) Array
C) Linked List
D) Queue
  • 20. What is the time complexity for searching in a binary search tree?
A) O(n)
B) O(log n)
C) O(1)
D) O(n log n)
  • 21. In a linked list, what is the name of the node that has no link to the next node?
A) Head
B) Root
C) Tail
D) Middle
  • 22. Which data structure is suitable for modeling real-world networks?
A) Graph
B) Binary search tree
C) Stack
D) Queue
  • 23. Which data structure is used by the heap data structure?
A) Queue
B) Binary tree
C) Stack
D) Hash table
  • 24. What is the disadvantage of using an array to store data?
A) Fixed size
B) Fast access time
C) Efficient for iterative operations
D) Easy insertion and deletion
  • 25. What type of data structure is a graph?
A) Sequential
B) Hierarchical
C) Linear
D) Non-linear
Created with That Quiz — the site for test creation and grading in math and other subjects.