Professional Documents
Culture Documents
Data Structures and Algo FINALS 2
Data Structures and Algo FINALS 2
Data Structures and Algo FINALS 2
State Finished
Completed on Thursday, 21 January 2021, 2:00 PM
Time taken 52 mins 31 secs
Marks 48/50
Grade 96 out of 100
Question 1
Complete
Mark 1 out of 1
Flag question
Question text
Question 2
Complete
Mark 1 out of 1
Flag question
Question text
Flag question
Question text
Question 4
Complete
Mark 1 out of 1
Flag question
Question text
This is very useful in situation when data have to be stored and then retrieved in
reverse order.
Select one:
a. queue
b. stack
c. list
d. link list
Question 5
Complete
Mark 1 out of 1
Flag question
Question text
Which data structure is suitable to represent the hierarchal relationship between
elements?
Select one:
a. Tree
b. Graph
c. Priority
d. Dequeue
Question 6
Complete
Mark 1 out of 1
Flag question
Question text
Question 7
Complete
Mark 1 out of 1
Flag question
Question text
Question 8
Complete
Mark 1 out of 1
Flag question
Question text
Which of the following data structure can't store the non-homogeneous data
elements?
Select one:
a. Arrays
b. Records
c. Stacks
d. Pointers
Question 9
Complete
Mark 1 out of 1
Flag question
Question text
Question 10
Complete
Mark 1 out of 1
Flag question
Question text
Algorithms that use a list must know whether the list is array based or linked.
Select one:
True
False
Question 11
Complete
Mark 1 out of 1
Flag question
Question text
Which of the following is true about the characteristics of abstract data types?
i. It exports a type.
ii. It exports a set of operations.
Select one:
a. True, True
b. False, False
c. False, True
d. True, False
Question 12
Complete
Mark 1 out of 1
Flag question
Question text
Flag question
Question text
Question 14
Complete
Mark 1 out of 1
Flag question
Question text
Question 15
Complete
Mark 1 out of 1
Flag question
Question text
Identify the data structure which allows deletions at both ends of the list but
insertion at only one end.
Select one:
a. Output restricted dequeue
b. Stack
c. Input restricted dequeue
d. Priority queues
Question 16
Complete
Mark 1 out of 1
Flag question
Question text
A binary search tree whose left subtree and right subtree differ in height by at
most 1 unit is called ____________________.
Select one:
a. Red-black tree
b. AVL tree
c. Lemma tree
d. None of these
Question 17
Complete
Mark 1 out of 1
Flag question
Question text
A binary tree is a tree in which each node can have zero, one, or two children.
Select one:
True
False
Question 18
Complete
Mark 0 out of 1
Flag question
Question text
Question 19
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A program to maintain the routes in an airline.
Select one:
a. Stack
b. Binary search tree
c. Queue
d. Graph
e. Tree
Question 20
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
Question 21
Complete
Mark 1 out of 1
Flag question
Question text
Select one:
True
False
Question 22
Complete
Mark 1 out of 1
Flag question
Question text
Question 23
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A dictionary of words used by a spelling checker to be built and maintained.
Select one:
a. Tree
b. Binary search tree
c. Stack
d. Graph
e. Queue
Question 24
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A bank simulation of its teller operation to see how waiting times would be
affected by adding another teller.
Select one:
a. Queue
b. Stack
c. Graph
d. Binary search tree
e. Tree
Question 25
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A word processor to have a PF key that causes the preceding command to be
redisplayed. Every time the PF key is pressed, the program is to show the
command that preceded the one currently displayed
Select one:
a. Graph
b. Stack
c. Queue
d. Tree
e. Binary search tree
Question 26
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A program to keep track of the soccer teams in a city tournament
Select one:
a. Queue
b. Graph
c. Binary search tree
d. Stack
e. Tree
Question 27
Complete
Mark 1 out of 1
Flag question
Question text
Which data structure allows deleting data elements from and inserting at rear?
Select one:
a. dequeues
b. binary search tree
c. stacks
d. queues
Question 28
Complete
Mark 1 out of 1
Flag question
Question text
Inserting an item into the stack when stack is not full is called ____________ while
operation and deletion of item from the stack, when stack is not empty is called
________________ operation.
Select one:
a. pop, push
b. push, pop
c. delete, insert
d. insert, delete
Question 29
Complete
Mark 1 out of 1
Flag question
Question text
Question 30
Complete
Mark 1 out of 1
Flag question
Question text
Question 31
Complete
Mark 1 out of 1
Flag question
Question text
A leaf in a tree is a node with no children.
Select one:
True
False
Question 32
Complete
Mark 1 out of 1
Flag question
Question text
Draw the binary search tree whose elements are inserted in the following order:
50 72 96 94 107 26 12 11 9 2 10 25 51 16 17 95
If Print is applied to the tree formed above, in which order would the elements
be printed?
2 9 10 11 12 16 17 25 26 50 51 72 94 95 96 107
Answer:
Question 33
Complete
Mark 1 out of 1
Flag question
Question text
It is a pile in which items are added at one end and removed from the other.
Select one:
a. list
b. queue
c. none of these
d. stack
Question 34
Complete
Mark 0 out of 1
Flag question
Question text
Select one:
True
False
Question 35
Complete
Mark 1 out of 1
Flag question
Question text
A stack displays FIFO behavior.
Select one:
True
False
Question 36
Complete
Mark 1 out of 1
Flag question
Question text
The value in the right child of a node (if it exists) in a binary search tree will be
greater than the value in the node itself.
Select one:
True
False
Question 37
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A program to keep track of patients as they check into a medical clinic,
assigning patients to doctors on a first-come, first-served basis.
Select one:
a. Queue
b. Stack
c. Binary search tree
d. Tree
e. Graph
Question 38
Complete
Mark 1 out of 1
Flag question
Question text
Question 39
Complete
Mark 1 out of 1
Flag question
Question text
Question 40
Complete
Mark 1 out of 1
Flag question
Question text
A queue displays LIFO behavior.
Select one:
True
False
Question 41
Complete
Mark 1 out of 1
Flag question
Question text
Question 42
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
An electronic address book ordered by name
Select one:
a. Queue
b. Graph
c. Binary search tree
d. Tree
e. Stack
Question 43
Complete
Mark 1 out of 1
Flag question
Question text
Question 44
Complete
Mark 1 out of 1
Flag question
Question text
Question 45
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A program keeping track of where canned goods are located on a shelf.
Select one:
a. Queue
b. Tree
c. Binary search tree
d. Stack
e. Graph
Question 46
Complete
Mark 1 out of 1
Flag question
Question text
Which data structure is used in breadth first search of a graph to hold nodes?
Select one:
a. Stack
b. Tree
c. Queue
d. Array
Question 47
Complete
Mark 1 out of 1
Flag question
Question text
The value in the left child of a node (if it exists) in a binary search tree will be
greater than the value in the node itself.
Select one:
True
False
Question 48
Complete
Mark 1 out of 1
Flag question
Question text
Question 49
Complete
Mark 1 out of 1
Flag question
Question text
A stack and a queue are different names for the same ADT.
Select one:
True
False
Question 50
Complete
Mark 1 out of 1
Flag question
Question text
Indicate which structure would be a more suitable choice for each of the
following applications.
A program to keep track of family relationships
Select one:
a. Tree
b. Stack
c. Binary search tree
d. Queue
e. Graph