Data Structure Quiz (Set 1) Data Structures (Set 1) 1 / 10 What is a 'depth-first search' (DFS) in graphs? A search algorithm that prioritizes exploring nodes at the same level before moving to the next level A search algorithm that explores the graph by visiting nodes in breadth-first order A search algorithm that explores the graph by visiting nodes as deeply as possible before backtracking A search algorithm that explores nodes in random order 2 / 10 What is a 'graph' in data structures? A linear data structure used to store elements in contiguous memory locations A non-linear data structure used to store elements in non-contiguous memory locations A data structure consisting of nodes connected by edges, representing relationships between entities A data structure used to implement stacks and queues 3 / 10 What is the 'height' of a binary tree? The number of nodes in the tree The length of the longest path from the root node to any leaf node The distance between the root node and the last node in the tree The total number of levels in the tree 4 / 10 What is a 'binary search tree'? A tree where each node can have more than two children A tree where each node can have exactly two children A tree where nodes are connected in a linear manner A tree where each node is connected to all other nodes 5 / 10 What is a 'tree' in data structures? A linear data structure used to store elements in contiguous memory locations A non-linear data structure used to store elements in non-contiguous memory locations A non-linear data structure consisting of nodes connected by edges, with a hierarchical structure A data structure used to implement stacks and queues 6 / 10 What is a 'hash table'? A linear data structure used to store elements in non-contiguous memory locations A non-linear data structure used to store key-value pairs in a hierarchical manner A data structure that uses a hash function to map keys to values, allowing for fast retrieval A data structure that uses linked lists to store elements 7 / 10 What is the purpose of a 'queue' in data structures? To store elements in a non-linear manner To implement a Last In First Out (LIFO) behavior To implement a First In First Out (FIFO) behavior To store key-value pairs in a structured manner 8 / 10 What is a 'stack' in data structures? A linear data structure that follows the Last In First Out (LIFO) principle A linear data structure that follows the First In First Out (FIFO) principle A non-linear data structure used to store key-value pairs A hierarchical data structure used to represent relationships between entities 9 / 10 What is the difference between an 'array' and a 'linked list'? Arrays are dynamic in size, while linked lists are static Arrays store elements in non-contiguous memory locations, while linked lists store elements in contiguous memory locations Arrays have constant-time access to elements, while linked lists have O(n) time access Arrays cannot be used to implement stacks and queues, while linked lists can 10 / 10 What is a 'linked list' in data structures? A linear data structure where elements are stored in contiguous memory locations A linear data structure where elements are stored in non-contiguous memory locations A non-linear data structure where elements are stored in key-value pairs A non-linear data structure where elements are stored in a hierarchical manner Your score isThe average score is 0% 0% Restart quiz