Prelim Exam - Data Structures and Algorithms
Prelim Exam - Data Structures and Algorithms
Question 1
Correct
A priority dequeue acts like a queue in that you dequeue an item by removing it from the front.
Select one:
True
False
Question 2
Correct
Select one:
a. MAX HEAP
b. TORIAL HEAP
c. MIN HEAP
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 1/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 3
Correct
Select one:
a. HASH ALGORITHM
b. HASH TABLE
c. HASH LOOP
Question 4
Correct
Select one:
True
False
Question 5
Correct
A graph is a collection of points, called vertices, and line segments connecting those points, called edges.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 2/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 6
Correct
The Floyd-Warshall algorithm outputs the correct result as long as no negative cycles exist in the input graph.
Select one:
a. FALSE
b. TRUE
c. POINTS
Question 7
Correct
Dijkstra's algorithm works correctly, because all edge weights are non-________, and the vertex with the least shortest-path estimate is always
chosen.
Select one:
a. POSITIVE
b. ZERO
c. NEGATIVE
Question 8
Correct
A RADIX is a specific tree based data structure in which all the nodes of tree are in a specific order.
Select one:
a. NO,it must be HEAP
b. TRUE
c. FALSE
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 3/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 9
Correct
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.
Select one:
a. HEAP SORT
b. SELECTION SORT
c. BUBBLE SORT
Question 10
Correct
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.
Select one:
a. ZERO
b. NEGATIVE
c. POSITIVE
Question 11
Correct
Hashing provides a more reliable and_ method of data retrieval than any other data structure.
Select one:
a. FLEXIBLE
b. CONCISE
c. STRECTHABLE
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 4/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 12
Correct
The four most common are probably line graphs, bar graphs and histograms, pie charts, and ?
Select one:
a. POP
b. LEAF
c. CARTESIAN
Question 13
Correct
______ 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.
Select one:
a. LOOP
b. TREE
c. SET
Question 14
Correct
Iterative control statements are used when we want to repeat the execution of one or more statements for specified number of times.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 5/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 15
Correct
___________ 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.
Select one:
a. HEAP SORT
b. BUBBLE SORT
c. MERGE SORT
Question 16
Correct
Select one:
True
False
Question 17
Correct
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)
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 6/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 18
Correct
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.
Select one:
True
False
Question 19
Correct
In computer science, a problem is said to have optimal substructure if an optimal solution can be constructed from optimal solutions of its
subproblems.
Select one:
a. FALSE
b. NO
c. TRUE
Question 20
Correct
Select one:
a. CROSS
b. HEAP
c. LEAF
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 7/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 21
Correct
Sorting is the process of arranging objects in a certain sequence or order according to specific rules.
Select one:
a. TRUE
b. FALSE
Question 22
Correct
A graph is a collection of points, called vertices, and line segments connecting those points, called _______.
Select one:
a. EDGES
b. POINTS
c. ANGLES
Question 23
Correct
The _______ algorithm is a graph search algorithm that finds the shortest path between a given source vertex and all other vertices in the
graph.
Select one:
a. DIJKSTRA
b. BELLMAN-FORD
c. FORD
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 8/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 24
Correct
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.
Select one:
True
False
Question 25
Correct
_________ algorithms work by recursively constructing a set of objects from the smallest possible constituent parts.
Select one:
a. SASH
b. GREEDY
c. BEARD
Question 26
Correct
Select one:
a. HASH
b. ALGORITHM
c. GRAPH
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 9/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 27
Correct
_____matrix in graph theory is a matrix sized n*n , where n is the number of vertices of the graph.
Select one:
a. POINTS
b. SET
c. PATH
Question 28
Correct
Select one:
True
False
Question 29
Correct
Select one:
a. FIRST IN FIRST OUT
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 10/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 30
Correct
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.
Select one:
a. 1.3
b. 1.5
c. 1.2
Question 31
Correct
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.
Select one:
True
False
Question 32
Correct
Select one:
a. BINARY
b. BINARY TREE
c. DATA TREE
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 11/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 33
Correct
___________ 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.
Select one:
a. SPIRAL QUEUE
b. LONG QUEUE
c. CIRCULAR QUEUE
Question 34
Correct
Select one:
True
False
Question 35
Correct
_______programming is a method of solving complex problems by breaking them down into simpler steps.
Select one:
a. DEFINED
b. DYNAMIC
c. SYSTEMATIC
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 12/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 36
Correct
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.
Select one:
a. MAX HEAP
b. MAX LOOP
c. MAX SORT
Question 37
Correct
The weighted longest path problem is the same as the Travelling salesman path problem, because the longest path always includes all
vertices.
Select one:
True
False
Question 38
Correct
In C++, hashing is a technique to directly search the location of desired data on the disk without using index structure.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 13/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 39
Correct
Select one:
a. RADIX
b. MERGE
c. HEAP
Question 40
Correct
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.
Select one:
True
False
Question 41
Correct
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.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 14/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 42
Correct
_______ memory is used to store local variables and function call while heap memory is used to store objects in Java.
Select one:
a. RADIX
b. STACK
c. SORT
Question 43
Correct
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.
Select one:
a. NO
b. YES
Question 44
Correct
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.
Select one:
True
False
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 15/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 45
Correct
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.
Select one:
a. FALSE
b. TRUE
c. NULL
Question 46
Correct
Select one:
a. SYSTEMATIC
b. UNIVERSAL
c. STABLE
Question 47
Correct
_________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.
Select one:
a. BUBBLE SORT
b. RADIX SORT
c. HEAP SORT
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 16/17
10/5/22, 8:33 PM Prelim Exam: Attempt review
Question 48
Correct
Select one:
True
False
Question 49
Correct
A graph consists of a set of nodes or vertices together with a set of edges or arcs where each edge joins two ______.
Select one:
a. POINTS
b. VERTEX
c. VERTICES
Question 50
Correct
A _______ queue acts like a queue in that you dequeue an item by removing it from the front.
Select one:
a. INTERNAL
b. PRIORITY
c. DIRECT
◄ Announcements
Jump to...
semestralexam.amaes.com/2212/mod/quiz/review.php?attempt=13794&cmid=4752 17/17