Data Structures Final Review

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By JererermyG
J
JererermyG
Community Contributor
Quizzes Created: 1 | Total Attempts: 123
| Attempts: 123 | Questions: 81
Please wait...
Question 1 / 81
0 %
0/100
Score 0/100
1. ______ is a data structure in which elements are added to the rear and removed from the front. A First-In-First-Out (FIFO) structure

Explanation

A queue is a data structure that follows the First-In-First-Out (FIFO) principle, where elements are added to the rear and removed from the front. This means that the element that is added first will be the first one to be removed. It operates like a queue of people waiting in line, where the person who arrives first is the first one to be served and leaves the line first. The queue data structure is commonly used in various applications such as job scheduling, message passing, and breadth-first search algorithms.

Submit
Please wait...
About This Quiz
Data Structures Final Review - Quiz

The 'Data Structures Final Review' quiz assesses understanding of fundamental data structures like stacks and queues. It covers concepts such as LIFO and FIFO principles, abstract data types, and performance of operations in linked lists, essential for efficient programming and computer science education.

Personalize your quiz and earn a certificate with your name on it!
2. To remove an elemnt from the end (queue)

Explanation

The correct answer is "Dequeue" because to remove an element from the end of a queue, we need to dequeue it. Dequeuing means removing an element from the front of the queue. Since a queue follows the FIFO (First-In-First-Out) principle, the element that was added first will be removed first. Therefore, to remove an element from the end of the queue, we need to dequeue it.

Submit
3. In Stack Methods: ____ Inserts object X onto the stack.

Explanation

The correct answer is PUSH(X) because the PUSH operation is used to insert an object X onto the stack. This operation adds the element to the top of the stack, making it the new top element.

Submit
4. ______ hashing uses 2 hash funtions to calculate the probe value

Explanation

Double hashing uses two hash functions to calculate the probe value. The first hash function is used to determine the initial position, and if that position is already occupied, the second hash function is used to calculate the next position to probe. This technique helps to resolve collisions and distribute the elements evenly in the hash table.

Submit
5. Inserting a node in an AVL tree will sometimes change the height of the tree

Explanation

When a node is inserted into an AVL tree, it may cause the tree to become unbalanced, which in turn may change the height of the tree. This is because AVL trees are self-balancing binary search trees that maintain a balance factor for each node, which is the difference between the heights of its left and right subtrees. If the balance factor of a node becomes greater than 1 or less than -1, the tree needs to be rebalanced by performing rotations. This rebalancing process can change the height of the tree as nodes are shifted and rearranged to maintain the balance factor constraint. Therefore, inserting a node in an AVL tree can indeed change the height of the tree.

Submit
6. A red-black tree is also a B.S.T.

Explanation

A red-black tree is a type of self-balancing binary search tree (B.S.T.) that maintains balance by ensuring that the tree height is always logarithmic. Therefore, all properties of a binary search tree, such as the left subtree containing nodes with smaller values and the right subtree containing nodes with larger values, still hold true for a red-black tree. Hence, the statement is true.

Submit
7. An enque is the opposite of a deque

Explanation

An enqueue operation adds an element to the end of a queue, while a dequeue operation removes an element from the front of the queue. On the other hand, a deque (double-ended queue) allows elements to be added or removed from both ends. Therefore, an enqueue operation is indeed the opposite of a dequeue operation, making the statement "An enque is the opposite of a deque" true.

Submit
8. ___ is the condition resulting when two or more keys produce the same hash location

Explanation

Collision is the condition that occurs when two or more keys in a hash table produce the same hash location. In a hash table, each key is mapped to a specific index using a hash function. However, due to the limited number of possible hash locations, it is possible for different keys to map to the same index. This is known as a collision. Collisions need to be resolved in order to maintain the integrity and efficiency of the hash table.

Submit
9. _____ is resolving a collison by computing a new hash location from a hash function that manipulates the original location rather than the elements key

Explanation

Rehashing is the process of resolving a collision by computing a new hash location from a hash function that manipulates the original location rather than the element's key. This technique is used when two or more elements in a hash table have the same hash value, causing a collision. By applying a different hash function or modifying the original hash value, rehashing allows for the redistribution of elements to different locations in the hash table, reducing the likelihood of collisions and improving the efficiency of the data structure.

Submit
10. The unique vertex in a rooted tree

Explanation

In a rooted tree, the root is the only vertex that has no incoming edges. It is the starting point of the tree and serves as the common ancestor for all other vertices. This unique vertex is responsible for giving the tree its hierarchical structure, as all other vertices are connected to it through edges. Therefore, the root is the correct answer for the given question.

Submit
11. In Stack Methods: ____ Returns a boolean inidcating if the stack is empty.

Explanation

The method "isStackEmpty()" returns a boolean indicating if the stack is empty. This means that when called, the method will check if there are any elements in the stack and return true if there are no elements, indicating that the stack is empty. Conversely, it will return false if there are elements in the stack, indicating that it is not empty.

Submit
12. Which are the Queue Methods

Explanation

The correct answer includes the methods Enqueue(X), Dequeue(), Size(), isQueueEmpty(), and Front(). These methods are commonly used in queue data structures. Enqueue(X) is used to add an element to the rear of the queue, Dequeue() is used to remove an element from the front of the queue, Size() returns the number of elements in the queue, isQueueEmpty() checks if the queue is empty, and Front() returns the element at the front of the queue without removing it.

Submit
13. An ordered tree in which each vertex has 0, 1, or 2 children

Explanation

A binary tree is an ordered tree where each vertex can have 0, 1, or 2 children. This means that each vertex in the tree can have either no children, one child, or two children. The term "binary" refers to the fact that each vertex has a maximum of two children. Therefore, the given answer "Binary Tree" accurately describes an ordered tree with these characteristics.

Submit
14. What is the In Order Traversal:

Explanation

The in-order traversal is a method of traversing a binary tree where the left subtree is visited first, followed by the root node, and then the right subtree. In this case, the given sequence 6 13 17 27 33 42 48 represents the in-order traversal of a binary tree. The numbers are arranged in ascending order, indicating that the left subtree contains smaller values, while the right subtree contains larger values.

Submit
15. Which are the Stack Methods

Explanation

The given methods POP(), PUSH(X), SIZE(), isStackEmpty(), and TOP() are the stack methods. POP() is used to remove the top element from the stack, PUSH(X) is used to add an element X to the top of the stack, SIZE() is used to determine the number of elements in the stack, isStackEmpty() checks if the stack is empty, and TOP() returns the top element of the stack without removing it. These methods are commonly used in stack data structures to manipulate and retrieve data.

Submit
16. A Red-Black tree is an BST tree

Explanation

A Red-Black tree is a type of binary search tree (BST) that has additional properties and rules for maintaining balance and ensuring efficient operations. It follows the properties of a BST, such as having a left child with a smaller value and a right child with a larger value. Therefore, the statement "A Red-Black tree is a BST tree" is true because a Red-Black tree is a specific implementation of a BST.

Submit
17. A queue is and ADT in which elemets are added and removed from one end only; first-in-first-out (FIFO) structure.

Explanation

The given statement accurately describes the characteristics of a queue. In a queue, elements are added at one end (rear) and removed from the other end (front) in a first-in-first-out (FIFO) manner. This means that the element that is added first will be the first one to be removed. Therefore, the statement is true.

Submit
18. To insert an element at the rear (queue)

Explanation

Enqueue is the correct answer because it refers to the operation of adding an element to the rear of a queue. In a queue, elements are added at the rear and removed from the front, following the First-In-First-Out (FIFO) principle. Therefore, Enqueue accurately describes the action of inserting an element at the rear of the queue. Dequeue, on the other hand, refers to removing an element from the front of the queue, so it is not the appropriate choice for this scenario.

Submit
19. A node connected via edges to a higher node

Explanation

The term "child" is used to describe a node that is connected to a higher node via edges. In a hierarchical structure, such as a tree, the child node is located below and is directly connected to its parent node. The child node is dependent on the parent node and is considered to be at a lower level in the hierarchy.

Submit
20. A Full Binary Tree in which all leaves have the same depth

Explanation

A perfect binary tree is a type of full binary tree in which all leaves have the same depth. In other words, every level of the tree is completely filled with nodes, and all leaf nodes are at the same level. This means that every parent node has exactly two children, except for the leaf nodes. Therefore, a perfect binary tree satisfies the given condition of having all leaves at the same depth.

Submit
21. LIFO structire stands for...

Explanation

LIFO structure stands for "Last In First Out". This means that the last item that is added to the structure will be the first one to be removed. It follows a stack-like behavior where the most recently added element is the first one to be accessed or processed. This concept is commonly used in data structures such as stacks, where the last item pushed onto the stack is the first one to be popped off.

Submit
22. A _____ function used to manipulate the key of an element in a list to identify its location in the list

Explanation

A hash function is used to manipulate the key of an element in a list in order to identify its location in the list. A hash function takes an input, typically the key of the element, and applies a mathematical algorithm to generate a unique hash value. This hash value is then used as an index to store or retrieve the element in the list. The purpose of a hash function is to efficiently distribute the elements across the list, reducing the time complexity for operations like insertion, deletion, and search.

Submit
23. Insert, Append, Delete, and Next are all valid list operations.

Explanation

The statement is true because "Insert," "Append," "Delete," and "Next" are all commonly used operations when working with lists. "Insert" is used to add an element at a specific position in the list, "Append" is used to add an element at the end of the list, "Delete" is used to remove an element from the list, and "Next" is used to access the next element in the list. Therefore, all four operations mentioned are valid list operations.

Submit
24. A node connected via edges to a lower node

Explanation

The correct answer is "parent" because in a hierarchical structure, a node connected via edges to a lower node is typically referred to as the parent node. The parent node is the one that is higher in the hierarchy and has a connection to one or more lower nodes. It provides a way to organize and structure the relationship between nodes in a hierarchical manner.

Submit
25. Property of all trees

Explanation

The given statement is a property of all trees. In a tree, the number of edges is always one less than the number of nodes. This can be explained by considering that each edge connects two nodes, so if we have n nodes in a tree, there will be n-1 edges connecting them. Therefore, the correct answer is #Edges = #Nodes - 1.

Submit
26. A hash table tends to perform better overall (bot time and space) than an array, linked list, or balanced B.S.T.

Explanation

A hash table is a data structure that allows for efficient storage and retrieval of key-value pairs. It uses a hash function to map keys to specific indexes in an array, which allows for constant time complexity for insertion, deletion, and retrieval operations on average. Compared to an array, linked list, or balanced binary search tree (B.S.T.), a hash table generally has better performance in terms of both time and space efficiency. This is because the hash function allows for direct access to the desired element, eliminating the need for traversal or sorting operations. Therefore, the statement "A hash table tends to perform better overall (both time and space) than an array, linked list, or balanced B.S.T." is true.

Submit
27. Reading a book (cover to cover) is an example of Post Order Traversal

Explanation

Pre order

Submit
28. For a normal (double linked) binary tree, __ pointers are assigned to each node

Explanation

In a normal (double linked) binary tree, each node has two pointers assigned to it. These two pointers are used to connect the node to its left child and its right child. This allows for efficient traversal and manipulation of the tree structure.

Submit
29. In Stack Methods: ____ removes the top object of the stack and returns it.

Explanation

The function POP() is used to remove the top object of the stack and return it. This operation is commonly referred to as "popping" an element from the stack. It is an essential method in stack data structures as it allows for the retrieval and removal of the most recently added element, maintaining the LIFO (Last-In-First-Out) principle of stacks.

Submit
30. ____ is the technique used for inserting and accessing elements in a list in a relative constant time by manipulating the key to identify its location in the list

Explanation

Hashing is a technique used for inserting and accessing elements in a list in a relative constant time by manipulating the key to identify its location in the list. It involves applying a hash function to the key, which generates a unique hash value. This hash value is then used as an index to store or retrieve the element in the list. By using this technique, the time complexity for insertion and retrieval operations becomes constant, regardless of the size of the list.

Submit
31. A node at level X is also said to be a depth of X

Explanation

A node at level X in a binary tree refers to its position or height within the tree. The depth of a node also represents its position or height within the tree. Therefore, it is correct to say that a node at level X is also said to be at a depth of X.

Submit
32. The length of the path from the root to the vertext of interst

Explanation

The term "depth" refers to the length of the path from the root of a tree to a specific vertex of interest. In a tree structure, each vertex has a level or depth assigned to it, indicating how many edges are traversed from the root to reach that vertex. Therefore, the answer "Depth" accurately describes the length of the path from the root to the vertex of interest in a tree.

Submit
33. The process of creating a B.S.T. (requires/does not require) sorting data.

Explanation

Creating a Binary Search Tree (B.S.T.) requires sorting data. This is because in a B.S.T., the left child node of a parent node must have a smaller value, while the right child node must have a larger value. To maintain this property, the data needs to be sorted before inserting it into the tree. If the data is not sorted, the B.S.T. may not function correctly, leading to incorrect search or traversal operations. Therefore, sorting the data is necessary in order to create a valid B.S.T.

Submit
34. The tendency of elements to become unevenly distributed in the hash table

Explanation

Clustering refers to the tendency of elements to become unevenly distributed in a hash table. It occurs when multiple elements hash to the same location, causing the formation of clusters. This can lead to performance issues as it increases the likelihood of collisions and can result in longer search times. To mitigate clustering, various techniques can be used such as rehashing, resizing the hash table, or using alternative collision resolution methods like chaining or linear probing.

Submit
35. The name of the second child of a vertex on a binary tree

Explanation

The correct answer is "Right Child" because in a binary tree, each vertex can have at most two children - a left child and a right child. The name "Right Child" refers to the child of a vertex that is located on the right side when looking at the tree structure. This child is connected to the vertex through its right branch.

Submit
36. _____ probing resolving a hash collision by generating pseudorandom hash values in successive applications of the rehash function

Explanation

Random probing is a technique used to resolve hash collisions by generating pseudorandom hash values in successive applications of the rehash function. Instead of linearly probing through the hash table, random probing selects a random offset to probe for an empty slot when a collision occurs. This helps to distribute the collided keys more evenly throughout the hash table, reducing the chances of further collisions and improving the overall performance of the hash table.

Submit
37. Postfix notation may not contain negative numbers

Explanation

The statement is true because in postfix notation, negative numbers are represented by using the minus sign (-) as a binary operator to subtract a number from another. Therefore, negative numbers themselves cannot be directly represented in postfix notation.

Submit
38. Linear probing is not a good solution for clustering

Explanation

Linear probing is not a good solution for clustering because it can lead to clustering, where consecutive elements are stored in close proximity to each other. This can result in poor performance and increased search time as the number of elements increases. Additionally, linear probing does not handle collisions efficiently, as it simply looks for the next available slot in the hash table, which can further contribute to clustering. Other collision resolution techniques, such as chaining or quadratic probing, are generally considered better options for handling clustering in hash tables.

Submit
39. An ordered tree in which each vertex has either no children, one child, or two children

Explanation

A binary tree is a type of ordered tree in which each vertex can have either no children, one child, or two children. In a binary tree, each vertex is called a node and it can have at most two children, referred to as the left child and the right child. This means that every node in a binary tree can have either 0, 1, or 2 children, making it different from other types of ordered trees where a node can have more than two children. Therefore, the given answer, "Binary Tree," accurately describes the characteristics of an ordered tree with these specific child constraints.

Submit
40. A post oder traversal may be used to evaluate an arithmetic expression

Explanation

A post order traversal is a way of traversing a binary tree where the left subtree is visited first, then the right subtree, and finally the root node. This traversal can be used to evaluate an arithmetic expression because it ensures that the operands of an operator are visited before the operator itself. This allows for the expression to be evaluated in the correct order, following the rules of arithmetic. Therefore, the statement "A post order traversal may be used to evaluate an arithmetic expression" is true.

Submit
41. Resolving a hash collision by sequentially searching a hash table beginning at the location returned by the hash function

Explanation

Linear probing is a method used to resolve hash collisions in a hash table. When a collision occurs, linear probing involves sequentially searching the hash table starting from the location returned by the hash function. It checks the next available slot in the table until an empty slot is found, allowing the collided item to be placed there. This process helps to avoid clustering, where multiple items are clustered together in the table, and instead distributes the items more evenly across the table.

Submit
42. The length of the longest path from a vertex to a leaf that is a descendent of the vertex

Explanation

The length of the longest path from a vertex to a leaf that is a descendant of the vertex is referred to as the height of the vertex. The height of a vertex represents the maximum number of edges that need to be traversed to reach a leaf node starting from that vertex. It is important to note that the height of a tree is determined by the height of its root node.

Submit
43. In Stack Methods: ____ returns the top object of the stack without removing it.

Explanation

The TOP() method returns the top object of the stack without removing it. This means that it allows us to access the element that is currently at the top of the stack without modifying the stack itself.

Submit
44. Stack is an Abstract Data Type

Explanation

The statement is true because a stack is indeed an abstract data type. An abstract data type refers to a data structure that is defined by its behavior and not by its implementation. A stack follows the Last-In-First-Out (LIFO) principle, where the last element added to the stack is the first one to be removed. This behavior is independent of how the stack is actually implemented in a programming language or system. Therefore, a stack can be considered an abstract data type.

Submit
45. The "best case" search time for a B.S.T. is O(n). (where n = the number of nodes in the tree)

Explanation

^worst case

Submit
46. Reading a book (cover to cover) is an example of Pre Order Traversal

Explanation

Pre-order traversal is a method used in tree traversal algorithms, where the root node is visited first, followed by the left subtree, and then the right subtree. In the context of reading a book, starting from the cover and going through each page until the end can be considered as a pre-order traversal. The cover represents the root node, and each subsequent page represents the left and right subtrees. Therefore, reading a book from cover to cover aligns with the concept of pre-order traversal, making the answer "True".

Submit
47. The DIR command in DOS (which returns fil/folder sizes) untilizes a ___ order traversal of the directory tree structure

Explanation

The DIR command in DOS utilizes a post order traversal of the directory tree structure. In a post order traversal, the algorithm visits the left subtree, then the right subtree, and finally the root node. This means that the command will first list the files and folders in the left subtree, then in the right subtree, and finally the current directory. This order allows for the sizes of all files and folders to be accurately calculated and displayed.

Submit
48. For a normal (double-linked) binary tree, 8 pointers are assigned to each node.

Explanation

4

Submit
49. The minimum height of a 14-node B.S.T. is 5

Explanation

3

Submit
50. A child (grandchild, great-grand-child, etc...) of a specific vertext.

Explanation

A descendant refers to a child, grandchild, great-grandchild, or any subsequent generation of a specific vertex. It signifies the lineage or offspring that can be traced back to a particular vertex. This term is commonly used in genealogy or family trees to describe the relationship between different generations.

Submit
51. All parents have the same depth, but not necessarily the same height

Explanation

This statement is false because it states that all parents have the same depth, but not necessarily the same height. However, in a family tree, parents are at a higher level than siblings, so they have a greater depth. Siblings, on the other hand, are at the same level and therefore have the same depth.

Submit
52. General trees will always have fewer nodes than its binary tree representation

Explanation

more

Submit
53. The maximum height of a 14-node B.S.T. is 13

Explanation

15

Submit
54. In Stack Methods: ____ rreturns the # of objects in the stack.

Explanation

The SIZE() method in Stack returns the number of objects currently present in the stack. This method is useful to determine the size or length of the stack at any given point. By calling SIZE(), we can obtain the count of elements in the stack and use it for various purposes such as checking if the stack is empty or full, or for iterating over the elements in the stack.

Submit
55. Pez Dispenser Anaolgy

Explanation

The given options, "Queue", "Stack", and "Array", are all data structures. A stack is a data structure that follows the Last-In-First-Out (LIFO) principle, meaning the last element added to the stack will be the first one to be removed. This analogy is similar to a Pez dispenser, where the last candy added is the first one to be dispensed. On the other hand, a queue follows the First-In-First-Out (FIFO) principle, and an array is a collection of elements stored in contiguous memory locations. Therefore, the correct answer is "Stack" as it best aligns with the Pez dispenser analogy.

Submit
56. Every vertex has two children or is a leaf

Explanation

A full binary tree is a type of binary tree in which every vertex has either two children or is a leaf node. In other words, there are no vertices with only one child. This means that every level of the tree is completely filled, except possibly for the last level, which is filled from left to right. Therefore, a full binary tree satisfies the given condition that every vertex has two children or is a leaf.

Submit
57. ______ probing is resolving a hash collision by using the rehashing formula

Explanation

Quadratic probing is a technique used to resolve hash collisions in a hash table. When a collision occurs, instead of immediately placing the new element in the next available slot, quadratic probing uses a rehashing formula to determine the next position to probe. This formula involves incrementing the hash index by a quadratic function of the number of collisions that have already occurred. This helps to distribute the elements more evenly throughout the hash table and reduce the chances of further collisions.

Submit
58. If "X" is a descendent of "Y", then "Y" is a __________ of "X".

Explanation

If "X" is a descendant of "Y", it means that "Y" is higher in the family tree and "X" is lower. Therefore, "Y" is an ancestor of "X". An ancestor is a person, animal, or plant from which one is descended or originates.

Submit
59. Any non-leaf vertext

Explanation

The correct answer is "Internal". In a tree structure, a non-leaf vertex refers to any node that is not a leaf node, meaning it has at least one child node. An internal node is another term used to describe a non-leaf vertex in a tree. Therefore, the correct answer is "Internal".

Submit
60. All ordered trees are binary trees

Explanation

Not all ordered trees are binary trees because an ordered tree can have any number of children at each node, while a binary tree can have at most two children at each node. Therefore, it is possible for an ordered tree to have more than two children at a node, making it not a binary tree.

Submit
61. The running time of RETREIVE call on a linked list is O(1) = constant

Explanation

The statement is false because the running time of a RETRIEVE call on a linked list is not constant or O(1). In a linked list, we need to traverse through the list from the beginning until we find the desired element. This process takes linear time, which means the running time is O(n), where n is the number of elements in the linked list.

Submit
62. Linear probing uses the numer of times the rehash function has been applied as a value in the hash formula

Explanation

Linear probing is a collision resolution technique in hashing where if a collision occurs, the algorithm looks for the next available slot in the hash table by incrementing the index until an empty slot is found. In linear probing, the number of times the rehash function has been applied is used as a value in the hash formula to determine the next index to probe. This helps in avoiding clustering of elements and ensures a more even distribution of values in the hash table. Therefore, the given statement is true.

Submit
63. All AVL trees are BST

Explanation

AVL trees are a type of binary search tree (BST) that is balanced, meaning the heights of the left and right subtrees differ by at most 1. Since AVL trees are a subset of BSTs and satisfy the additional balancing condition, it can be concluded that all AVL trees are also BSTs. Therefore, the correct answer is true.

Submit
64. Rehashing guarentees a reduction in clustering

Explanation

Rehashing does not guarantee a reduction in clustering. Rehashing is a technique used in hash tables to resolve collisions by finding a new position for an element when a collision occurs. While it can help distribute the elements more evenly, it does not guarantee a reduction in clustering, which refers to the tendency of elements to cluster in specific positions within the hash table. Other techniques like resizing the hash table or using more advanced collision resolution methods may be needed to reduce clustering.

Submit
65. Stack is an Abstract Class

Explanation

The statement "Stack is an Abstract Class" is incorrect. A stack is a data structure that follows the LIFO (Last In, First Out) principle, where elements are added and removed from only one end. In programming, a stack can be implemented using an array or a linked list. It is not an abstract class itself, but rather a concept that can be implemented using different programming languages and paradigms.

Submit
66. A collection of elements associated with a particular hash location

Explanation

A bucket is a collection of elements associated with a particular hash location. It is used in hash tables to store multiple elements that have the same hash value. Each bucket contains a linked list or an array to hold these elements. When a collision occurs, meaning multiple elements are hashed to the same location, they are placed in the same bucket. This allows for efficient retrieval of elements during hash table operations.

Submit
67. A BST tree is always balanced

Explanation

AVL

Submit
68. Prior to inserting intoa B.S.T., you must sort the tree

Explanation

^search not sort

Submit
69. Which are Binary Trees?

Explanation

The given answer includes all the options A, B, C, D, and E. Therefore, all of these options are binary trees.

Submit
70. A splay tree is also an AVL

Explanation

B.S.T.

Submit
71. Double hashing requires more "computational overhead" than linear probing.

Explanation

Rehashing

Submit
72. All the descendents of a vertex

Explanation

The correct answer is "Sub Tree." In graph theory, a sub tree is a portion of a tree that is formed by selecting a vertex and all its descendants. Therefore, all the descendants of a vertex can be considered as a sub tree.

Submit
73.

Explanation

not-available-via-ai

Submit
74. Red-Black trees are tree that have been restrctured with a heuristic similar to a self-organizing list

Explanation

Splay trees

Submit
75. Which are Perfect Binary Trees?

Explanation

A, B, and D are perfect binary trees because they have all their internal nodes with exactly two children and all their leaf nodes at the same level. A perfect binary tree is a binary tree in which all levels are completely filled except possibly the last level, which is filled from left to right. In contrast, C and E are not perfect binary trees because they do not have all their internal nodes with exactly two children.

Submit
76. A linked list of elements that share the same hash location

Explanation

In the context of hash tables, a chain refers to a linked list of elements that share the same hash location. When multiple elements in a hash table have the same hash value, they are stored in a chain, with each element pointing to the next element in the list. This allows for efficient handling of collisions in hash tables, as elements with the same hash value can be easily accessed and managed by following the chain.

Submit
77. A In Order traversal may be used to print an arithmetic expression

Explanation

Pre order

Submit
78. Choose two ways to resolve problems following a deletion in a list using linear probing. Choose all that apply

Explanation

To resolve problems following a deletion in a list using linear probing, two possible approaches are shifting everything and inserting null in the deleted variable. Shifting everything involves moving all the elements in the list after the deleted element to fill the empty space. This ensures that the list remains contiguous and maintains the order of elements. Inserting null in the deleted variable means marking the deleted element as null, indicating that it is no longer a valid value. This allows for efficient searching and avoids potential errors when accessing the deleted element.

Submit
79. What is a disadvantage of using buckets for collision resolution? Choose all that apply

Explanation

Using buckets for collision resolution can have several disadvantages. Firstly, it takes longer to walk down the bucket list, as each element in the bucket needs to be checked before finding the desired item. Secondly, using buckets can result in wasted space, as some buckets may remain empty while others become overcrowded. Lastly, not knowing how big the bucket is can be a disadvantage as it may lead to inefficient memory allocation and potential performance issues.

Submit
80. Which are Full Binary Trees?

Explanation

A full binary tree is a binary tree in which every node other than the leaves has two children. In the given options, A, B, D, and E are all binary trees where every non-leaf node has two children, making them full binary trees. Therefore, A, B, D, and E are the correct answers.

Submit
81. Which are Binary Search Trees?

Explanation

not-available-via-ai

Submit
View My Results

Quiz Review Timeline (Updated): Mar 4, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 04, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Apr 26, 2011
    Quiz Created by
    JererermyG
Cancel
  • All
    All (81)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
______ is a data structure in which elements are added to the rear and...
To remove an elemnt from the end (queue)
In Stack Methods: ____ Inserts object X onto the stack.
______ hashing uses 2 hash funtions to calculate the probe value
Inserting a node in an AVL tree will sometimes change the height of...
A red-black tree is also a B.S.T.
An enque is the opposite of a deque
___ is the condition resulting when two or more keys produce the same...
_____ is resolving a collison by computing a new hash location from a...
The unique vertex in a rooted tree
In Stack Methods:...
Which are the Queue Methods
An ordered tree in which each vertex has 0, 1, or 2 children
What is the In Order Traversal:
Which are the Stack Methods
A Red-Black tree is an BST tree
A queue is and ADT in which elemets are added and removed from one end...
To insert an element at the rear (queue)
A node connected via edges to a higher node
A Full Binary Tree in which all leaves have the same depth
LIFO structire stands for...
A _____ function used to manipulate the key of an element in a list to...
Insert, Append, Delete, and Next are all valid list operations.
A node connected via edges to a lower node
Property of all trees
A hash table tends to perform better overall (bot time and space) than...
Reading a book (cover to cover) is an example of Post Order Traversal
For a normal (double linked) binary tree, __ pointers are assigned to...
In Stack Methods:...
____ is the technique used for inserting and accessing elements in a...
A node at level X is also said to be a depth of X
The length of the path from the root to the vertext of interst
The process of creating a B.S.T. (requires/does not require) sorting...
The tendency of elements to become unevenly distributed in the hash...
The name of the second child of a vertex on a binary tree
_____ probing resolving a hash collision by generating pseudorandom...
Postfix notation may not contain negative numbers
Linear probing is not a good solution for clustering
An ordered tree in which each vertex has either no children, one...
A post oder traversal may be used to evaluate an arithmetic expression
Resolving a hash collision by sequentially searching a hash table...
The length of the longest path from a vertex to a leaf that is a...
In Stack Methods:...
Stack is an Abstract Data Type
The "best case" search time for a B.S.T. is O(n). (where n =...
Reading a book (cover to cover) is an example of Pre Order Traversal
The DIR command in DOS (which returns fil/folder sizes) untilizes a...
For a normal (double-linked) binary tree, 8 pointers are assigned to...
The minimum height of a 14-node B.S.T. is 5
A child (grandchild, great-grand-child, etc...) of a specific vertext.
All parents have the same depth, but not necessarily the same height
General trees will always have fewer nodes than its binary tree...
The maximum height of a 14-node B.S.T. is 13
In Stack Methods: ____ rreturns the # of objects in the stack.
Pez Dispenser Anaolgy
Every vertex has two children or is a leaf
______ probing is resolving a hash collision by using the rehashing...
If "X" is a descendent of "Y", then "Y"...
Any non-leaf vertext
All ordered trees are binary trees
The running time of RETREIVE call on a linked list is O(1) = constant
Linear probing uses the numer of times the rehash function has been...
All AVL trees are BST
Rehashing guarentees a reduction in clustering
Stack is an Abstract Class
A collection of elements associated with a particular hash location
A BST tree is always balanced
Prior to inserting intoa B.S.T., you must sort the tree
Which are Binary Trees?
A splay tree is also an AVL
Double hashing requires more "computational overhead" than...
All the descendents of a vertex
Red-Black trees are tree that have been restrctured with a heuristic...
Which are Perfect Binary Trees?
A linked list of elements that share the same hash location
A In Order traversal may be used to print an arithmetic expression
Choose two ways to resolve problems following a deletion in a list...
What is a disadvantage of using buckets for collision resolution?...
Which are Full Binary Trees?
Which are Binary Search Trees?
Alert!

Advertisement