Data Structure and Algo - Prelim To Finals! (Main)
Data Structure and Algo - Prelim To Finals! (Main)
Data Structure and Algo - Prelim To Finals! (Main)
-False
Enqueue means to insert an item into the back of the queue, dequeue means inserting the front item.
-FALSE
-True
-False
-False
An invariant is a statement about program variables that is true every time the execution of the program
reaches the invariant.
-True
Array holds multiple values, whereas an ordinary value hold a single value.
-True
A recursive function calls itself, the memory for a called function is allocated on top of a memory
allocated to calling function and different copy of local variables is created for each function call.
-True
Lists is a way to group together related piece of information, so that they are easy to read and
understand.
-True
A loop invariant is a property of a program loop that is true before each iteration.
-True
-False
-True
An iteration is a data structure, which can store a fixed size collection of elements of the same data type.
-False
-False
In an entry controlled loop, a condition is checked before executing the body of a loop, it is called pre-
checking loop.
-True
An array is used to store a collection of data , but it is often more useful to think of an array as a
collection of variables of the same type.
-True
Iterative control statements are used when we want to repeat the execution of one or more statements
for specified number of times.
-True
A queue is a collection of entities that are maintained in a sequence and can be modified by the addition
of entities at one end of the sequence and removal from the other end of the sequence.
-True
-True
-True
A hash function is any function that can be used to map data of arbitrary size to fixed-size values.
-True
Advantages of Hash Search,Hashing provides a more reliable and flexible method of data retrieval than
any other data structure. It is faster than searching arrays and lists. In the same space it can retrieve in
1.3probes anything stored in a tree that will otherwise take log n probes.
-False
Cryptographic hash functions add security features to typical hash functions, thereby making it difficult
to detect the contents of a message or information about recipients and senders.
-True
In DBMS,hashing is a technique to directly search the location of desired data on the disk without using
index structure.
-True
A graph function that returns a unique hash number is called a universal hash function.
-True
The hash table should be an array with length about 1.5times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number
-False
BLAKE2 is a cryptographic hash function faster than MD5, SHA-1, SHA-2, and SHA-3, yet is at least as
secure as the latest standard SHA-3. BLAKE2 has been adopted by many projects due to its high speed,
security, and simplicity.
-True
The four most common are probably line graphs, bar graphs and histograms, pie charts, and Cartesian
graphs.
-True
A graph is undirected each edge is an unordered pair {u,v} of vertices, and we don't regard either of the
two vertices as having a distinct role from the other.
-True
Graphs are a powerful and versatile data structure that easily allow you to represent real life
relationships between different types of data.
-True
Path Matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-True
-True
“One-way” means that it is practically possible to go the other way - to turn the hashed.
-False
The Shortest Path Faster Algorithm (SPFA) is an improvement of the Bellman–Ford algorithm which
computes single-source shortest paths in a weighted directed graph.
-True
Dijkstra doesn't work for Graphs with negative weight edges, Bellman-Ford works for such
graphs.Bellman-Ford is also simpler than Dijkstra and suites well for distributed systems.
-True
There is a simple tweak to get from DFS to an algorithm that will find the shortest paths on an
unweighted graph. Essentially, you replace the stack used by DFS with a queue.
-True
BFS doesn't use a priority queue (or array, should you consider using that) storing the distances, and.
BFS doesn't perform edge relaxations
-True
Dynamic programming is a method of solving complex problems by breaking them down into simpler
steps.
-True
Dijkstra was the one that discovered the algorithm for trees in the year of 1970.
-False
Dijkstra's algorithm can be used to determine the shortest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-True
Dijkstra's algorithm works correctly, because all edge weights are non-negative, and the vertex with the
least shortest-path estimate is always chosen.
-True
a directed acyclic graph (DAG) is a graphthat is directed and without cycles connecting the other edges
-True
A* is the most popular choice for pathfinding, because it's fairly flexible and can be used in a wide range
of contexts. A* is like Dijkstra's Algorithm in that it can be used to find a shortest path.
-True
-True
BFS doesn't use a priority queue (or array, should you consider using that) storing the distances, and.
BFS doesn't perform edge relaxations
-True
Johnson's algorithm works best with sparse graphs,This algorithm varies from the rest as it relies on two
other algorithms to determine the shortest path
-True
The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given
source vertex and all other vertices in the graph
-True
Dijkstra's algorithm can be used to determine the longest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-False
-True
Dijkstra's algorithm is an algorithm creates a tree of shortest paths from the starting vertex, the source,
to all other points in the graph.
-True
In terms of implementation, BFS is usually implemented with Queue , while DFS uses a LOOP.
-False
The weighted longest path problem is the same as the Travelling salesman path problem, because the
longest path always includes all vertices.
-True
Dynamic programming is heavily used in computer networks, routing, graph problems, computer vision,
artificial intelligence, machine learning etc.
-True
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input
graph.
-True
-True
A hash function takes a group of characters (called a key) and maps it to a value of a certain length
(called a hash value or hash)
-True
The selection is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements. If the 0th element is found to be greater
than the compared element, the two values get interchanged.
-True
A RADIX is a specific tree based data structure in which all the nodes of tree are in a specific order.
A binary tree where the left child contains only nodes with values less than the parent node, and where
the right child only contains nodes with values greater than or equal to the parent.
-YES
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-TRUE
Binary Search Tree, is a node-based binary tree data structure which has the following properties: The
left subtree of a node contains only nodes with keys lesser than the node's key. The right subtree of a
node contains only nodes with keys greater than the node's key.
-TRUE
A hash function that returns a unique hash number is called a _______hash function.
-UNIVERSAL
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
-PRIORITY
_______programming is a method of solving complex problems by breaking them down into simpler
steps.
-DYNAMIC
The recursion is the repeated application of a recursive procedure or definition.
-True
Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other
vertices even if the graph contains a _______ weight edge.
-NEGATIVE
An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.
-True
______ is one of the most powerful and advanced data structures. It is a non-linear data structure
compared to arrays, linked lists, stack and queue. It represents the nodes connected by edges.
-TREE
Bubble Sort Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element. If the 0th element is found greater than the 1st
element, then the swapping operation will be performed, i.e., the two values will get interchanged. In
this way, all the elements of the array get compared.
-True
The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given
source vertex and all other vertices in the graph.
-True
A ________ is a data structure that has two types of elements, vertices and edges.
-GRAPH
_________Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element.
-BUBBLE SORT
A simple data type can store only one value at a time.
-True
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source
vertex and all other vertices in the graph.
-BELLMAN-FORD
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
-TRUE
A queue is a collection of entities that are maintained in a sequence and can be modified by the
addition of entities at one end of the sequence and removal from the other end of the sequence.
-True
The ______ is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements.
-SELECTION SORT
The hash table should be an array with length about __times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number.
Answer: 1.3
-True
Iterative control statements are used when we want to repeat the execution of one or more statements
for specified number of times.
-True
A graph is a collection of points, called vertices, and line segments connecting those points, called
edges.
-True
_______ memory is used to store local variables and function call while heap memory is used to store
objects in Java.
-STACK
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins
two ______.
-VERTICES
_________ algorithms work by recursively constructing a set of objects from the smallest possible
constituent parts.
-GREEDY
___________ is a linear data structure in which the operations are performed based on FIFO (First In
First Out) principle and the last position is connected back to the first position to make a circle.
-CIRCULAR QUEUE
The weighted longest path problem is the same as the Travelling salesman path problem, because the
longest path always includes all vertices.
-True
-MAX HEAP
A binary _______ is a complete binary tree which satisfies the heap ordering property.
-HEAP
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-PATH
Dijkstra's algorithm can be used to determine the shortest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-True
In C++, hashing is a technique to directly search the location of desired data on the disk without using
index structure.
-True
-HASH TABLE
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
-True
A ________ is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-MAX HEAP
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with
the least shortest-path estimate is always chosen.
-NEGATIVE
Hashing provides a more reliable and_ method of data retrieval than any other data structure.
-FLEXIBLE
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
-CARTESIAN
A graph is a collection of points, called vertices, and line segments connecting those points, called
_______.
-EDGES
-BINARY TREE
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-True
___________ is another sorting technique and has an algorithm that has a reasonably proficient space-
time complexity - O(n log n) and is quite trivial to apply.
-MERGE SORT
-RADIX
A graph is a data structure that has two types of elements, vertices and angles.
-False
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-True
Sa agham pangkompyuter, ang grap ay isang uri ng datos na abstrakt na binubuo ng set ng mga node at
isang set ng mga edge o gilid na nagtatakda ng relasyon sa pagitan ng mga node. Ang grap na ADT ay
nagmumula sa konsepto ng grap sa matematika.Wikipedia
-True
A Priority Queue in Java does not have any restriction with regard to duplicate elements.
-True
-True
The following are other terms of Binary search tree. EXCEPT ONE.
-search loop
A sorting algorithm is said to be _________ if two objects with equal keys appear in the same order in
sorted output as they appear in the input unsorted array.
-STABLE
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-True
A binary tree is a finite set of nodes that is either empty or consist a root node and two disjoint binary
trees called the left subtree and the right subtree.
-TRUE
Breadth-____-search is the algorithm that will find shortest paths in an unweighted graph.
-FIRST
A ____________ is a tree in which every node other than the leaves has two children.
A Priority Queue in Java does not have any restriction with regard to duplicate elements.
-True
A _____________is a binary tree in which every level, except possibly the last, is completely filled, and
all nodes are as far left as possible.
-GENERAL
_____________ have less memory consumption as compared to linear queue because while doing
insertion after deletion operation it allocate an extra space the first remaining vacant but in circular
queue the first is used as it comes immediate after the last.
-CIRCULAR QUEUE
-CONTAINS 2N-1
A Binary Tree is labeled if every node is assigned a label and a Binary Tree is __________ if nodes are not
assigned any label.
-UNLABELED
_________ is a linear data structure which follows a particular order in which the operations are
performed.
-STACK
Merge sort is more efficient and works faster than quick sort in case of larger array size or datasets.
-TRUE
-SELECTION
-UNSTABLE
In _________sorting data is stored outside memory (like on disk) and only loaded into memory in small
chunks.
-EXTERNAL
-TRUE
__________ is a common operation in many applications, and efficient algorithms to perform it have
been developed.
-SORTING
The _________ is slightly faster than the heap sort for larger sets, but it requires twice the memory of
the heap sort because of the second array.
-MERGE SORT
-QUEUE
-NO
-massive
A ___________ is a tree with some extra leaf nodes at depth n+1, all toward the left.
In a _____ skewed, most of the nodes have the leftchild without corresponding right child.
-LEFT
Bubble Sort is based on the idea of repeatedly comparing pairs of ________ELEMENTS swapping their
positions if they exist in the wrong order.
-ADJACENT
-PRIORITY
This transformation consists of replacing every null subtree of the original tree with “special nodes.” The
nodes from the original tree are then internal nodes , while the “special nodes” are external nodes
-YES
-IN PLACE
A binary tree is either empty or consists of a node called the root together with two binary trees called
the left subtree and the right subtree.
-TRUE
-Heap sort
-ENQUEUE
This is the Best Sorting Algorithm That the time complexity of Quicksort is O(n log n) in the best case,
O(n log n) in the average case, and O(n^2) in the worst case.
-QUICKSORT
A ___________ is a specific tree based data structure in which all the nodes of tree are in a specific
order.
-HEAP
________is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-SORTING
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input
graph.
-True
-True
A hash function takes a group of characters (called a key) and maps it to a value of a certain length
(called a hash value or hash)
-True
The selection is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements. If the 0th element is found to be greater
than the compared element, the two values get interchanged.
-True
A RADIX is a specific tree based data structure in which all the nodes of tree are in a specific order.
A binary tree where the left child contains only nodes with values less than the parent node, and where
the right child only contains nodes with values greater than or equal to the parent.
-YES
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-TRUE
Binary Search Tree, is a node-based binary tree data structure which has the following properties: The
left subtree of a node contains only nodes with keys lesser than the node's key. The right subtree of a
node contains only nodes with keys greater than the node's key.
-TRUE
A hash function that returns a unique hash number is called a _______hash function.
-UNIVERSAL
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
-PRIORITY
_______programming is a method of solving complex problems by breaking them down into simpler
steps.
-DYNAMIC
-True
Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other
vertices even if the graph contains a _______ weight edge.
-NEGATIVE
An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.
-True
______ is one of the most powerful and advanced data structures. It is a non-linear data structure
compared to arrays, linked lists, stack and queue. It represents the nodes connected by edges.
-TREE
Bubble Sort Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element. If the 0th element is found greater than the 1st
element, then the swapping operation will be performed, i.e., the two values will get interchanged. In
this way, all the elements of the array get compared.
-True
The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given
source vertex and all other vertices in the graph.
-True
A ________ is a data structure that has two types of elements, vertices and edges.
-GRAPH
_________Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element.
-BUBBLE SORT
-True
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source
vertex and all other vertices in the graph.
-BELLMAN-FORD
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
-TRUE
A queue is a collection of entities that are maintained in a sequence and can be modified by the
addition of entities at one end of the sequence and removal from the other end of the sequence.
-True
The ______ is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements.
-SELECTION SORT
The hash table should be an array with length about __times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number.
Answer: 1.3
-True
Iterative control statements are used when we want to repeat the execution of one or more statements
for specified number of times.
-True
A graph is a collection of points, called vertices, and line segments connecting those points, called
edges.
-True
_______ memory is used to store local variables and function call while heap memory is used to store
objects in Java.
-STACK
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins
two ______.
-VERTICES
_________ algorithms work by recursively constructing a set of objects from the smallest possible
constituent parts.
-GREEDY
___________ is a linear data structure in which the operations are performed based on FIFO (First In
First Out) principle and the last position is connected back to the first position to make a circle.
-CIRCULAR QUEUE
The weighted longest path problem is the same as the Travelling salesman path problem, because the
longest path always includes all vertices.
-True
-MAX HEAP
A binary _______ is a complete binary tree which satisfies the heap ordering property.
-HEAP
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-PATH
Dijkstra's algorithm can be used to determine the shortest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-True
In C++, hashing is a technique to directly search the location of desired data on the disk without using
index structure.
-True
-HASH TABLE
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
-True
A ________ is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-MAX HEAP
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with
the least shortest-path estimate is always chosen.
-NEGATIVE
Hashing provides a more reliable and_ method of data retrieval than any other data structure.
-FLEXIBLE
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
-CARTESIAN
A graph is a collection of points, called vertices, and line segments connecting those points, called
_______.
-EDGES
-BINARY TREE
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-True
___________ is another sorting technique and has an algorithm that has a reasonably proficient space-
time complexity - O(n log n) and is quite trivial to apply.
-MERGE SORT
-RADIX
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-True
-False
Merge sort - A sorting algorithm which divides the elements to subgroups and then merges back to
make a sorted.
-True
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
-True
A priority queue in Java is a special type of queue wherein all the elements are ordered as per their
natural ordering or based on a custom TEMPERATURE supplied at the time of creation.
-False
Bubble Sort Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element. If the 0th element is found greater than the 1st
element, then the swapping operation will be performed, i.e., the two values will get interchanged. In
this way, all the elements of the array get compared.
-True
The selection is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements. If the 0th element is found to be greater
than the compared element, the two values get interchanged.
-True
Merge sort is another sorting technique and has an algorithm that has a reasonably proficient space-
time complexity - O(n log n) and is quite trivial to apply.
-True
Priority queue. Priority queues are a type of container adaptors, specifically designed such that its first
element is always the greatest of the elements it contains, according to some strict weak ordering
criterion.
-True
Quicksort — is the WORST Sorting Algorithm The time complexity of Quicksort is O(n log n) in the best
case, O(n log n) in the average case, and O(n^2) in the worst case.
-False
External Sorting If all the data that is to be sorted can be adjusted at a time in the main memory, the
internal sorting method is being performed.
-False
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-True
Sorting is an important issue in Data Structure which creates the sequence of the list of items.
-True
A heap is a specific tree based data structure in which all the nodes of tree are in a specific order.
-True
A Priority Queue in Java does not have any restriction with regard to duplicate elements.
-True
Internal Sorting is when the data that is to be sorted cannot be accommodated in the memory at the
same time and some has to be kept in auxiliary memory such as hard disk, floppy disk, magnetic tapes
etc, then external sorting methods are performed.
-False
Radix Sort - A sorting algorithm used for numbers.
-True
Loop sorting is any process that involves arranging the data into some meaningful order to make it
easier to understand, analyze or visualize.
-False
QUICK Sort - A sorting algorithm which is a comparison based sorting technique based on Binary Heap
data structure.
-False
Internal Sorting: If all the data that is to be sorted can be adjusted at a time in the main memory, the
internal sorting method is being performed.
-True
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input
graph.
-True
-True
A hash function takes a group of characters (called a key) and maps it to a value of a certain length
(called a hash value or hash)
-True
The selection is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements. If the 0th element is found to be greater
than the compared element, the two values get interchanged.
-True
A RADIX is a specific tree based data structure in which all the nodes of tree are in a specific order.
A binary tree where the left child contains only nodes with values less than the parent node, and where
the right child only contains nodes with values greater than or equal to the parent.
-YES
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-TRUE
Binary Search Tree, is a node-based binary tree data structure which has the following properties: The
left subtree of a node contains only nodes with keys lesser than the node's key. The right subtree of a
node contains only nodes with keys greater than the node's key.
-TRUE
A hash function that returns a unique hash number is called a _______hash function.
-UNIVERSAL
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
-PRIORITY
_______programming is a method of solving complex problems by breaking them down into simpler
steps.
-DYNAMIC
-True
Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other
vertices even if the graph contains a _______ weight edge.
-NEGATIVE
An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.
-True
______ is one of the most powerful and advanced data structures. It is a non-linear data structure
compared to arrays, linked lists, stack and queue. It represents the nodes connected by edges.
-TREE
Bubble Sort Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element. If the 0th element is found greater than the 1st
element, then the swapping operation will be performed, i.e., the two values will get interchanged. In
this way, all the elements of the array get compared.
-True
The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given
source vertex and all other vertices in the graph.
-True
A ________ is a data structure that has two types of elements, vertices and edges.
-GRAPH
_________Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element.
-BUBBLE SORT
-True
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source
vertex and all other vertices in the graph.
-BELLMAN-FORD
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
-TRUE
A queue is a collection of entities that are maintained in a sequence and can be modified by the
addition of entities at one end of the sequence and removal from the other end of the sequence.
-True
The ______ is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements.
-SELECTION SORT
The hash table should be an array with length about __times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number.
Answer: 1.3
-True
Iterative control statements are used when we want to repeat the execution of one or more statements
for specified number of times.
-True
A graph is a collection of points, called vertices, and line segments connecting those points, called
edges.
-True
_______ memory is used to store local variables and function call while heap memory is used to store
objects in Java.
-STACK
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins
two ______.
-VERTICES
_________ algorithms work by recursively constructing a set of objects from the smallest possible
constituent parts.
-GREEDY
___________ is a linear data structure in which the operations are performed based on FIFO (First In
First Out) principle and the last position is connected back to the first position to make a circle.
-CIRCULAR QUEUE
The weighted longest path problem is the same as the Travelling salesman path problem, because the
longest path always includes all vertices.
-True
-MAX HEAP
A binary _______ is a complete binary tree which satisfies the heap ordering property.
-HEAP
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-PATH
Dijkstra's algorithm can be used to determine the shortest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-True
In C++, hashing is a technique to directly search the location of desired data on the disk without using
index structure.
-True
-HASH TABLE
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
-True
A ________ is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-MAX HEAP
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with
the least shortest-path estimate is always chosen.
-NEGATIVE
Hashing provides a more reliable and_ method of data retrieval than any other data structure.
-FLEXIBLE
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
-CARTESIAN
A graph is a collection of points, called vertices, and line segments connecting those points, called
_______.
-EDGES
-BINARY TREE
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-True
___________ is another sorting technique and has an algorithm that has a reasonably proficient space-
time complexity - O(n log n) and is quite trivial to apply.
-MERGE SORT
-RADIX
A graph is a data structure that has two types of elements, vertices and angles.
-False
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-True
Sa agham pangkompyuter, ang grap ay isang uri ng datos na abstrakt na binubuo ng set ng mga node at
isang set ng mga edge o gilid na nagtatakda ng relasyon sa pagitan ng mga node. Ang grap na ADT ay
nagmumula sa konsepto ng grap sa matematika.Wikipedia
-True
A Priority Queue in Java does not have any restriction with regard to duplicate elements.
-True
-True
The following are other terms of Binary search tree. EXCEPT ONE.
-search loop
A sorting algorithm is said to be _________ if two objects with equal keys appear in the same order in
sorted output as they appear in the input unsorted array.
-STABLE
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-True
A binary tree is a finite set of nodes that is either empty or consist a root node and two disjoint binary
trees called the left subtree and the right subtree.
-TRUE
Breadth-____-search is the algorithm that will find shortest paths in an unweighted graph.
-FIRST
A ____________ is a tree in which every node other than the leaves has two children.
A Priority Queue in Java does not have any restriction with regard to duplicate elements.
-True
A _____________is a binary tree in which every level, except possibly the last, is completely filled, and
all nodes are as far left as possible.
-GENERAL
_____________ have less memory consumption as compared to linear queue because while doing
insertion after deletion operation it allocate an extra space the first remaining vacant but in circular
queue the first is used as it comes immediate after the last.
-CIRCULAR QUEUE
-CONTAINS 2N-1
A Binary Tree is labeled if every node is assigned a label and a Binary Tree is __________ if nodes are not
assigned any label.
-UNLABELED
_________ is a linear data structure which follows a particular order in which the operations are
performed.
-STACK
Merge sort is more efficient and works faster than quick sort in case of larger array size or datasets.
-TRUE
The ________ sort is a combination of searching and sorting.
-SELECTION
-UNSTABLE
-ENQUEUE
In _________sorting data is stored outside memory (like on disk) and only loaded into memory in small
chunks.
-EXTERNAL
-TRUE
__________ is a common operation in many applications, and efficient algorithms to perform it have
been developed.
-SORTING
The _________ is slightly faster than the heap sort for larger sets, but it requires twice the memory of
the heap sort because of the second array.
-MERGE SORT
-QUEUE
A binary tree is considered full if every node has exactly 0 or 2 children. A binary tree is considered
incomplete if every level is full except the last, and all nodes are pushed as far left as possible
-NO
-massive
A ___________ is a tree with some extra leaf nodes at depth n+1, all toward the left.
In a _____ skewed, most of the nodes have the leftchild without corresponding right child.
-LEFT
Bubble Sort is based on the idea of repeatedly comparing pairs of ________ELEMENTS swapping their
positions if they exist in the wrong order.
-ADJACENT
-PRIORITY
This transformation consists of replacing every null subtree of the original tree with “special nodes.” The
nodes from the original tree are then internal nodes , while the “special nodes” are external nodes
-YES
A binary tree is either empty or consists of a node called the root together with two binary trees called
the left subtree and the right subtree.
-TRUE
-Heap sort
-ENQUEUE
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input
graph.
-True
-True
A hash function takes a group of characters (called a key) and maps it to a value of a certain length
(called a hash value or hash)
-True
The selection is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements. If the 0th element is found to be greater
than the compared element, the two values get interchanged.
-True
A RADIX is a specific tree based data structure in which all the nodes of tree are in a specific order.
A binary tree where the left child contains only nodes with values less than the parent node, and where
the right child only contains nodes with values greater than or equal to the parent.
-YES
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-TRUE
Binary Search Tree, is a node-based binary tree data structure which has the following properties: The
left subtree of a node contains only nodes with keys lesser than the node's key. The right subtree of a
node contains only nodes with keys greater than the node's key.
-TRUE
A hash function that returns a unique hash number is called a _______hash function.
-UNIVERSAL
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
-PRIORITY
_______programming is a method of solving complex problems by breaking them down into simpler
steps.
-DYNAMIC
-True
Bellman Ford algorithm is useful in finding shortest path from a given source vertex to all the other
vertices even if the graph contains a _______ weight edge.
-NEGATIVE
An MD5 hash function encodes a string of information and encodes it into a 128-bit fingerprint.
-True
______ is one of the most powerful and advanced data structures. It is a non-linear data structure
compared to arrays, linked lists, stack and queue. It represents the nodes connected by edges.
-TREE
Bubble Sort Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element. If the 0th element is found greater than the 1st
element, then the swapping operation will be performed, i.e., the two values will get interchanged. In
this way, all the elements of the array get compared.
-True
The Bellman-Ford algorithm is a graph search algorithm that finds the shortest path between a given
source vertex and all other vertices in the graph.
-True
A ________ is a data structure that has two types of elements, vertices and edges.
-GRAPH
_________Algorithm is used to arrange N elements in ascending order, and for that, you have to begin
with 0th element and compare it with the first element.
-BUBBLE SORT
-True
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source
vertex and all other vertices in the graph.
-BELLMAN-FORD
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
-TRUE
A queue is a collection of entities that are maintained in a sequence and can be modified by the
addition of entities at one end of the sequence and removal from the other end of the sequence.
-True
The ______ is a straightforward process of sorting values. In this method, to sort the data in ascending
order, the 0thelement is compared with all other elements.
-SELECTION SORT
The hash table should be an array with length about __times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number.
Answer: 1.3
-True
Iterative control statements are used when we want to repeat the execution of one or more statements
for specified number of times.
-True
A graph is a collection of points, called vertices, and line segments connecting those points, called
edges.
-True
_______ memory is used to store local variables and function call while heap memory is used to store
objects in Java.
-STACK
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins
two ______.
-VERTICES
_________ algorithms work by recursively constructing a set of objects from the smallest possible
constituent parts.
-GREEDY
___________ is a linear data structure in which the operations are performed based on FIFO (First In
First Out) principle and the last position is connected back to the first position to make a circle.
-CIRCULAR QUEUE
The weighted longest path problem is the same as the Travelling salesman path problem, because the
longest path always includes all vertices.
-True
-MAX HEAP
A binary _______ is a complete binary tree which satisfies the heap ordering property.
-HEAP
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-PATH
Dijkstra's algorithm can be used to determine the shortest path from one node in a graph to every other
node within the same graph data structure, provided that the nodes are reachable from the starting
node.
-True
In C++, hashing is a technique to directly search the location of desired data on the disk without using
index structure.
-True
-HASH TABLE
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
-True
A ________ is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-MAX HEAP
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with
the least shortest-path estimate is always chosen.
-NEGATIVE
Hashing provides a more reliable and_ method of data retrieval than any other data structure.
-FLEXIBLE
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
-CARTESIAN
A graph is a collection of points, called vertices, and line segments connecting those points, called
_______.
-EDGES
-BINARY TREE
Sorting is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-True
___________ is another sorting technique and has an algorithm that has a reasonably proficient space-
time complexity - O(n log n) and is quite trivial to apply.
-MERGE SORT
-RADIX
This may take place only when there is some minimum amount or no space left in free storage list.
-Garbage collection
In a linked list, the ____________ contains the address of next element in the list.
-Link field
Indexing the ________________ element in the list is not possible in linked lists.
-middle
This refers to a linear collection of data items.
-List
-Two fields
A linear list in which the pointer points only to the successive node.
-AVAIL
Answer: 0
-for the size of the structure and the data in the structure are constantly changing
-predecessor node
Answer: 2
-Underflow
What is a run list?
-traversal
This is a linear list in which insertions and deletions are made to form either end of the structure.
-Dequeue
-Sentinel
A linear list in which the last node points to the first node.
-Back
-Top
A pointer variable which contains the location at the top element of the stack.
-Top
-FIFO lists
-Reverse
-front
-push
What is a queue?
-FIFO
In the linked representation of the stack, __________ pointer behaves as the top pointer variable of
stack.
-Start
-LIFO
In linked representation of stack, the null pointer of the last node in the list signals
_____________________.
-pop
Stack follows the strategy of ________________.
-LIFO
In linked representation of stack, ___________ fields hold the elements of the stack.
-INFO
-stacks
-Pop
-all of these
-push
This form of access is used to add and remove nodes from a queue.
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins
two ______.
-VERTICES
This is the Best Sorting Algorithm That the time complexity of Quicksort is O(n log n) in the best case,
O(n log n) in the average case, and O(n^2) in the worst case.
-QUICKSORT
A binary tree where the left child contains only nodes with values less than the parent node, and where
the right child only contains nodes with values greater than or equal to the parent.
-YES
________is any process of arranging items systematically, and has two common, yet distinct meanings:
ordering: arranging items in a sequence ordered by some criterion; categorizing: grouping items with
similar properties.
-SORTING
- MAX HEAP
______ is one of the most powerful and advanced data structures. It is a non-linear data structure
compared to arrays, linked lists, stack and queue. It represents the nodes connected by edges.
-TREE
A graph is a collection of points, called vertices, and line segments connecting those points, called
_______.
-EDGES
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source
vertex and all other vertices in the graph.
-BELLMAN-FORD
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-TRUE
_______programming is a method of solving complex problems by breaking them down into simpler
steps.
-DYNAMIC
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
-PATH
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
-PRIORITY
A ________ is a complete binary tree in which the value in each internal node is greater than or equal to
the values in the children of that node.
-MAX HEAP
-HASH TABLE
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
-CARETESIAN
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
-TRUE
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with
the least shortest-path estimate is always chosen.
-NEGATIVE
_________ algorithms work by recursively constructing a set of objects from the smallest possible
constituent parts.
-GREEDY
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input
graph.
-TRUE
In ___________ we specify an object that is used as a key, and the value we want to associate to that
key.
-HASTABLE
Breadth-first-search is the algorithm that will find shortest paths in an _____ graph.
-UNWEIGHTED
A hash function is a function which when given a key, generates an address in the table.
-Yes
Tree is a hierarchical data structure which stores the information naturally in the form of hierarchy style.
-TRUE
-TABLE
Path Matrix in graph theory is a matrix sized ___ , where n is the number of vertices of the graph.
Answer: n*n
Kruskal's Algorithm : performs better in typical situations (sparse graphs) because it uses simpler data
structures. Prim's Algorithm : is significantly ___the limit when you've got a really dense graph with
many more edges than vertices.
-faster
The Three methods in HASHING in open addressing are linear probing, quadratic probing, and
_____hashing.
-DOUBLE
Graphs are a powerful and versatile data structure that easily allow you to represent real life
relationships between different types of data (nodes).
-YES
Comparing BFS and DFS, the big advantage of DFS is that it has much _____memory requirements than
BFS, because it's not necessary to store all of the child pointers at each level.
-LOWER
-BOTH A AND B
-GENERAL
A directed general-graph is a general-graph in which the set E is the set of ordered pairs of vertices.
-TRUE
Shortest path algorithms are a family of algorithms designed to solve the shortest path problem.
-YES
In computer science, a problem is said to have optimal substructure if an optimal solution can be
constructed from optimal solutions of its subproblems.
-True
Graph Algorithms or Graph ______ are analytic tools used to determine strength and direction of
relationships between objects in a graph.
-ANALYTICS
The eight most commonly used graphs are linear, power, quadratic, polynomial, rational, ______,
logarithmic, and sinusoidal.
-EXPONENTIAL
An MD5 hash function encodes a string of information and encodes it into a___bit fingerprint.
Answer: 128
_____Algorithm : is significantly faster in the limit when you've got a really dense graph with many more
edges than vertices.
-PRIM'S
An ______hash function encodes a string of information and encodes it into a 128-bit fingerprint.
-MD5
Eulerian refers to the Swiss mathematician _____Euler, who invented graph theory in the 18th century.
-LEONHARD
A complete digraph is a directed graph in which every pair of distinct vertices is connected by a ___of
unique edges (one in each direction).
-PAIR
A graph is a picture designed to express words, particularly the connection between two or more
quantities.
-TRUE
Dijkstra's algorithm is Dijkstra's algorithm, it is neither algorithm because BFS and DFS themselves are
not Dijkstra's algorithm.
-True
Dynamic programming is a method of solving complex problems by breaking them down into simpler
steps.
-Yes
-YES
-GRAPHS
-STRICT
A graph is a____structure that has two types of elements, vertices and edges.
-DATA
_______ Algorithm : performs better in typical situations (sparse graphs) because it uses simpler data
structures.
-KRUSKAL'S
A hash function is a function which when given a key, generates an address in the table.
-True
-YES
The hash table should be an array with length about _ times the maximum number of keys that will
actually be in the table, and. Size of hash table array should be a prime number.
Answer: 1.3