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