Data Structures and Algorithm Q1 Finals 2
Data Structures and Algorithm Q1 Finals 2
A bank simulation of its teller operation to see how waiting times would be
Queue
affected by adding another teller.
FIFO, First In First Out This form of access is used to add and remove nodes from a queue.
A binary tree is a tree in which each node can have zero, one, or two
TRUE
children.
circular linked list In linked lists, there are no NULL links in ______________
This is a linear list in which insertions and deletions are made to form either
Dequeue
end of the structure.
Dequeue "This form of access is used to add/remove nodes from a stack. "
Top A pointer variable which contains the location at the top element of the stack.
None of these Which of the following is not the part of ADT description?
This may take place only when there is some minimum amount or no space
Garbage collection
left in free storage list.
The value in the right child of a node (if it exists) in a binary search tree will
TRUE
be greater than the value in the node itself.
In linked representation of stack, the null pointer of the last node in the list
Bottom of the stack
signals _____________________.
circular linked list A linear list in which the last node points to the first node.
Which of the following data structure can't store the non-homogeneous data
Arrays
elements?
Two fields Each node in a linked list must contain at least ___________________.
In linked representation of stack, the null pointer of the last node in the list
Bottom of the stack
signals ____________
The value in the left child of a node (if it exists) in a binary search tree will be
FALSE
greater than the value in the node itself.
A binary search tree whose left subtree and right subtree differ in height by at
AVL tree
most 1 unit is called ____________________.
Stack A program keeping track of where canned goods are located on a shelf.
Indicate which structure would be a more suitable choice for each of the
Tree, Binary search tree
following applications.
Alexandria is the payroll manager and stores critical file on her local drive for
added security on her Windows 7 computer. She wants to ensure that she is
Mirrored volumes
using the disk configuration with the most fault tolerance and the highest level
of consistent availability. Which of the following provisions should she use?
Reverse "The elements are removal from a stack in _________ order. "
FALSE Algorithms that use a list must know whether the list is array based or linked.
FIFO lists Which of the following names does not relate to stacks?
Queue Which data structure is used in breadth first search of a graph to hold nodes?
Pop This is the term used to delete an element from the stack.
All of these Which of the following is/are the levels of implementation of data structure?
queue It is a pile in which items are added at one end and removed from the other.
FALSE A stack and a queue are different names for the same ADT.
You use a portable computer that has Windows 7 Enterprise SP1 installed. A
From Accessories, click
conference room at your company has a network projector installed on a
Connect to a Network
server within the company network. You need to connect to the projector
Projector
from your computer. What should you do?
None of these ____________________ is not the component of data structure.
You are the system administrator for your company. You are configuring the
services on a Windows 7 computer. You want to ensure that if a service fails
Recovery
to load, it will attempt to restart. Which tab of the service`s Properties dialog
box should you use?
FALSE A binary search cannot be applied to a tree.
Kayla is dissatisfied with the configuration of her keyboard and mouse. She
Control Panel wants to reset the keyboard speed and the mouse pointer rate. Which utility
should she use to configure the keyboard and mouse properties?
This is very useful in situation when data have to be stored and then retrieved
stack
in reverse order.
singly linked list A linear list in which the pointer points only to the successive node.
Select one:
a.
A tree graph
b.
all of these
c.
Free tree
d.
A tree
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
The complexity of merge sort algorithm.
Select one:
a.
O(logn)
b.
c.
O(n2)
d.
O(n logn)
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Flag question
Question text
A connected graph T without any cycles is called ________________.
Select one:
a.
circular graph
b.
free graph
c.
non-cycle graph
d.
no cycle graph
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
This is a binary tree whose every node has either zero or two children.
Select one:
a.
data structure
b.
complete binary tree
c.
binary search tree
d.
extended binary tree
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Flag question
Question text
In a graph, if e=[u,v], then u and v are called _______________
Select one:
a.
Neighbors
b.
Adjacent nodes
c.
End points of e
d.
All of the choices
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Flag question
Question text
The depth of complete binary tree is given by ________________.
Select one:
a.
Dn = n log2n+1
b.
Dn = log2n
c.
Dn = log2n+1
d.
Dn = n log2n
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Flag question
Question text
The complexity of sorting algorithm measures the __________ as a function of the number n of
items to be shorter.
Select one:
a.
running time
b.
case-complexity
c.
average time
d.
average-case complexity
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Flag question
Question text
In a graph, if E=(u,v), it means _____________.
Select one:
a.
v is adjacent to u but u is not adjacent to v
b.
e begins at processor v and ends at successor u
c.
u is adjacent to v but v is not adjacent to u
d.
e begins at processor u and ends at successor v
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Flag question
Question text
The worst case occurs in linear search algorithm when ________________.
Select one:
a.
Item is the last element in the array or item is not there at all
b.
Item is not in the array at all
c.
Item is somewhere in the middle of the array
d.
Item is the last element in the array
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Flag question
Question text
___________ sorting algorithm is frequently used when n is small, where n is the total number of
elements.
Select one:
a.
Bubble
b.
Quick
c.
Insertion
d.
Heap
Question 1
Answer saved
Marked out of 1.00
Flag question
Question text
The complexity of linear search algorithm.
Select one:
a.
O(n logn)
b.
O(n2)
c.
O(logn)
d.
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
The method used by card sorter.
Select one:
a.
Heap
b.
Quick
c.
Radix sort
d.
Insertion
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Flag question
Question text
Which of the following is not the required condition for binary search algorithm?
Select one:
a.
There must be mechanism to delete and/or insert elements in list
b.
Number values should only be present
c.
The list must be sorted
d.
There should be the direct access to the middle element in any sub list.
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
State True or False for internal sorting algorithms.
i. Internal sorting are applied when the entire collection if data to be sorted is small enough that
the sorting can take place within main memory.
ii. The time required to read or write is considered significant in evaluating the performance of
internal sorting.
Select one:
a.
False, True
b.
True, False
c.
False, False
d.
True, True
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Flag question
Question text
___________ sorting algorithm is frequently used when n is small, where n is the total number of
elements.
Select one:
a.
Heap
b.
Insertion
c.
Quick
d.
Bubble
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Flag question
Question text
The average case occurs in linear search algorithm _______________.
Select one:
a.
when item is the last element in the array
b.
item is the last element in the array or item is not there at all
c.
when item is somewhere in the middle of the array
d.
when item is not the array at all
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Flag question
Question text
The worst case occurs in linear search algorithm when ________________.
Select one:
a.
Item is the last element in the array or item is not there at all
b.
Item is somewhere in the middle of the array
c.
Item is not in the array at all
d.
Item is the last element in the array
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Flag question
Question text
_____________ order is the best possible for array sorting algorithm which sorts n item.
Select one:
a.
O(n2)
b.
O(n logn)
c.
O(logn)
d.
O(n+logn)
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Flag question
Question text
The complexity of sorting algorithm measures the __________ as a function of the number n of
items to be shorter.
Select one:
a.
average time
b.
case-complexity
c.
running time
d.
average-case complexity
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Flag question
Question text
The complexity of merge sort algorithm.
Select one:
a.
O(n logn)
b.
O(n2)
c.
O(logn)
d.
Question 1
Answer saved
Marked out of 1.00
Flag question
Question text
This refers to a linear collection of data items.
Select one:
a.
Edge
b.
Tree
c.
Graph
d.
List
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
The term used to insert an element into stack.
Select one:
a.
pump
b.
pull
c.
pop
d.
push
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Flag question
Question text
In linked representation of stack, the null pointer of the last node in the list signals
_____________________.
Select one:
a.
Bottom of the stack
b.
Beginning of the stack
c.
In between some value
d.
Middle of the stack
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
Which of the following is an application of stack?
Select one:
a.
infix to postfix
b.
finding factorial
c.
tower of Hanoi
d.
all of these
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Flag question
Question text
Linked lists are best suited _____________________.
Select one:
a.
data structure
b.
for relatively permanent collections of data
c.
for the size of the structure and the data in the structure are constantly changing
d.
for none of these situations
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Flag question
Question text
What happens when you push a new node onto a stack?
Select one:
a.
The new node is placed at the back of the linked list
b.
The new node is placed at the front of the linked list
c.
No changes happen
d.
The new node is placed at the middle of the linked list
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Remove flag
Question text
Which of the following is two way lists?
Select one:
a.
Circular header list
b.
Linked list with header and trailer nodes
c.
List traversed in two directions
d.
Grounded header list
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Flag question
Question text
Value of first linked list index is _______________.
Select one:
a.
2
b.
0
c.
-1
d.
1
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Flag question
Question text
Indexing the ________________ element in the list is not possible in linked lists.
Select one:
a.
middle
b.
anywhere in between
c.
last
d.
first
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Flag question
Question text
This form of access is used to add/remove nodes from a stack.
Select one:
a.
None of these
b.
Both of these
c.
FIFO
d.
LIFO
Clear my choice
Question 11
Answer saved
Marked out of 1.00
Flag question
Question text
The elements are removal from a stack in _________ order.
Select one:
a.
Reverse
b.
Sequential
c.
Alternative
d.
Hierarchical
Clear my choice
Question 12
Answer saved
Marked out of 1.00
Flag question
Question text
Which is the pointer associated with the availability list?
Select one:
a.
REAR
b.
FIRST
c.
TOP
d.
AVAIL
Clear my choice
Question 13
Answer saved
Marked out of 1.00
Flag question
Question text
This is the term used to delete an element from the stack.
Select one:
a.
Pop
b.
Pump
c.
Pull
d.
Push
Clear my choice
Question 14
Answer saved
Marked out of 1.00
Flag question
Question text
A linear list in which the pointer points only to the successive node.
Select one:
a.
doubly linked list
b.
circular linked list
c.
none of these
d.
singly linked list
Clear my choice
Question 15
Answer saved
Marked out of 1.00
Flag question
Question text
Deletion operation is done using __________ in a queue.
Select one:
a.
front
b.
top
c.
list
d.
rear
Clear my choice
Question 16
Answer saved
Marked out of 1.00
Flag question
Question text
What is a queue?
Select one:
a.
LOFI
b.
LIFO
c.
FILO
d.
FIFO
Clear my choice
Question 17
Answer saved
Marked out of 1.00
Flag question
Question text
This indicates the end of the list.
Select one:
a.
Guard
b.
Last pointer
c.
End pointer
d.
Sentinel
Clear my choice
Question 18
Answer saved
Marked out of 1.00
Flag question
Question text
Which is the pointer associated with the stack?
Select one:
a.
FRONT
b.
TOP
c.
FIRST
d.
REAR
Clear my choice
Question 19
Answer saved
Marked out of 1.00
Flag question
Question text
In the linked representation of the stack, __________ pointer behaves as the top pointer variable
of stack.
Select one:
a.
Stop
b.
Start
c.
Begin
d.
Avail
Clear my choice
Question 20
Answer saved
Marked out of 1.00
Flag question
Question text
In linked representation of stack, ___________ fields hold the elements of the stack.
Select one:
a.
NULL
b.
INFO
c.
TOP
d.
LINK
Clear my choice
Question 21
Answer saved
Marked out of 1.00
Flag question
Question text
In a linked list, the ____________ contains the address of next element in the list.
Select one:
a.
Info field
b.
Next element field
c.
Link field
d.
Start field
Clear my choice
Question 22
Answer saved
Marked out of 1.00
Flag question
Question text
Each node in singly linked list has _______ fields.
Select one:
a.
4
b.
3
c.
1
d.
2
Clear my choice
Question 23
Answer saved
Marked out of 1.00
Flag question
Question text
The operation of processing each element in the list is known as ________________.
Select one:
a.
sorting
b.
inserting
c.
traversal
d.
merging
Clear my choice
Question 24
Answer saved
Marked out of 1.00
Flag question
Question text
This is a linear list in which insertions and deletions are made to form either end of the structure.
Select one:
a.
Priority
b.
Dequeue
c.
Circular queue
d.
Random of queue
Clear my choice
Question 25
Answer saved
Marked out of 1.00
Flag question
Question text
The retrieval of items in a stack is ___________ operation.
Select one:
a.
pop
b.
retrieval
c.
access
d.
push
Clear my choice
Question 26
Answer saved
Marked out of 1.00
Flag question
Question text
Which of the following names does not relate to stacks?
Select one:
a.
FIFO lists
b.
Push down lists
c.
Piles
d.
LIFO lists
Clear my choice
Question 27
Answer saved
Marked out of 1.00
Flag question
Question text
This is the insertion operation in the stack.
Select one:
a.
insert
b.
top
c.
push
d.
pop
Clear my choice
Question 28
Answer saved
Marked out of 1.00
Flag question
Question text
This may take place only when there is some minimum amount or no space left in free storage
list.
Select one:
a.
Maintenance
b.
Garbage collection
c.
Recycle bin
d.
Memory management
Clear my choice
Question 29
Answer saved
Marked out of 1.00
Flag question
Question text
Each node in a linked list must contain at least ___________________.
Select one:
a.
Four fields
b.
Three fields
c.
Two fields
d.
Five fields
Clear my choice
Question 30
Answer saved
Marked out of 1.00
Flag question
Question text
Stack follows the strategy of ________________.
Select one:
a.
LRU
b.
RANDOM
c.
FIFO
d.
LIFO
Question 1
Answer saved
Marked out of 1.00
Flag question
Question text
This is the insertion operation in the stack.
Select one:
a.
top
b.
pop
c.
insert
d.
push
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
The retrieval of items in a stack is ___________ operation.
Select one:
a.
retrieval
b.
push
c.
pop
d.
access
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Flag question
Question text
In linked representation of stack, the null pointer of the last node in the list signals
_____________________.
Select one:
a.
Middle of the stack
b.
Bottom of the stack
c.
In between some value
d.
Beginning of the stack
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
This is the term used to delete an element from the stack.
Select one:
a.
Push
b.
Pop
c.
Pull
d.
Pump
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Flag question
Question text
The term push and pop is related to _____________.
Select one:
a.
lists
b.
array
c.
stacks
d.
trees
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Flag question
Question text
Deletion operation is done using __________ in a queue.
Select one:
a.
list
b.
front
c.
top
d.
rear
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Flag question
Question text
New nodes are added to the ________ of the queue.
Select one:
a.
Back
b.
Middle
c.
Front and Back
d.
Front
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Flag question
Question text
This form of access is used to add/remove nodes from a stack.
Select one:
a.
FIFO
b.
Both of these
c.
LIFO
d.
None of these
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Flag question
Question text
In linked representation of stack, ___________ fields hold the elements of the stack.
Select one:
a.
INFO
b.
LINK
c.
TOP
d.
NULL
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Flag question
Question text
A pointer variable which contains the location at the top element of the stack.
Select one:
a.
Final
b.
Last
c.
End
d.
Top
Question 8
Answer saved
Marked out of 1.00
Remove flag
Question text
Which is the pointer associated with the stack?
Select one:
a.
REAR
b.
TOP
c.
FRONT
d.
FIRST
Question 4
Answer saved
Marked out of 1.00
Remove flag
Question text
The elements are removal from a stack in _________ order.
Select one:
a.
Alternative
b.
Sequential
c.
Reverse
d.
Hierarchical
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Remove flag
Question text
New nodes are added to the ________ of the queue.
Select one:
a.
Front and Back
b.
Back
c.
Front
d.
Middle
Question 7
Answer saved
Marked out of 1.00
Remove flag
Question text
The term used to insert an element into stack.
Select one:
a.
pull
b.
pump
c.
pop
d.
push
Question 4
Answer saved
Marked out of 1.00
Remove flag
Question text
Which of the following is an application of stack?
Select one:
a.
infix to postfix
b.
tower of Hanoi
c.
finding factorial
d.
all of these
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Remove flag
Question text
Stack follows the strategy of ________________.
Select one:
a.
FIFO
b.
LRU
c.
LIFO
d.
RANDOM
Question 1
Answer saved
Marked out of 1.00
Remove flag
Question text
What is a queue?
Select one:
a.
FILO
b.
FIFO
c.
LOFI
d.
LIFO
Question 10
Answer saved
Marked out of 1.00
Remove flag
Question text
The situation when in a linked list START=NULL is ____________________.
Select one:
a.
Underflow
b.
Saturated
c.
Overflow
d.
Houseful
Question 1
Answer saved
Marked out of 1.00
Remove flag
Question text
Value of first linked list index is _______________.
Select one:
a.
-1
b.
0
c.
2
d.
1
Question 1
Answer saved
Marked out of 1.00
Remove flag
Question text
This form of access is used to add and remove nodes from a queue.
Select one:
a.
LIFO, Last In First Out
b.
FIFO, First In First Out
c.
Both of these
d.
None of these
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Remove flag
Question text
Which of the following names does not relate to stacks?
Select one:
a.
Piles
b.
LIFO lists
c.
Push down lists
d.
FIFO lists
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Remove flag
Question text
Deletion operation is done using __________ in a queue.
Select one:
a.
rear
b.
top
c.
list
d.
front
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Remove flag
Question text
The retrieval of items in a stack is ___________ operation.
Select one:
a.
push
b.
pop
c.
access
d.
retrieval
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Remove flag
Question text
A pointer variable which contains the location at the top element of the stack.
Select one:
a.
Top
b.
Final
c.
Last
d.
End
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Remove flag
Question text
This is the insertion operation in the stack.
Select one:
a.
insert
b.
push
c.
top
d.
pop
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Remove flag
Question text
This is the term used to delete an element from the stack.
Select one:
a.
Push
b.
Pop
c.
Pump
d.
Pull
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Remove flag
Question text
What happens when you push a new node onto a stack?
Select one:
a.
The new node is placed at the middle of the linked list
b.
The new node is placed at the back of the linked list
c.
No changes happen
d.
The new node is placed at the front of the linked list
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Remove flag
Question text
In the linked representation of the stack, __________ pointer behaves as the top pointer variable
of stack.
Select one:
a.
Start
b.
Avail
c.
Begin
d.
Stop
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Remove flag
Question text
The term push and pop is related to _____________.
Select one:
a.
array
b.
lists
c.
stacks
d.
trees
Question 8
Answer saved
Marked out of 1.00
Remove flag
Question text
The operation of processing each element in the list is known as ________________.
Select one:
a.
sorting
b.
inserting
c.
merging
d.
traversal
Question 2
Answer saved
Marked out of 1.00
Remove flag
Question text
Linked lists are best suited _____________________.
Select one:
a.
for the size of the structure and the data in the structure are constantly changing
b.
for none of these situations
c.
for relatively permanent collections of data
d.
data structure
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Remove flag
Question text
Each node in a linked list must contain at least ___________________.
Select one:
a.
Two fields
b.
Four fields
c.
Three fields
d.
Five fields
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Remove flag
Question text
Indexing the ________________ element in the list is not possible in linked lists.
Select one:
a.
middle
b.
last
c.
anywhere in between
d.
first
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Remove flag
Question text
Which is the pointer associated with the availability list?
Select one:
a.
TOP
b.
REAR
c.
AVAIL
d.
FIRST
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Remove flag
Question text
This refers to a linear collection of data items.
Select one:
a.
Graph
b.
Tree
c.
Edge
d.
List
Question 1
Answer saved
Marked out of 1.00
Flag question
Question text
LINK is the pointer pointing to the ____________________.
Select one:
a.
predecessor node
b.
successor node
c.
head node
d.
last node
Clear my choice
Question 2
Answer saved
Marked out of 1.00
Flag question
Question text
In a linked list, the ____________ contains the address of next element in the list.
Select one:
a.
Next element field
b.
Link field
c.
Info field
d.
Start field
Clear my choice
Question 3
Answer saved
Marked out of 1.00
Flag question
Question text
A linear list in which the pointer points only to the successive node.
Select one:
a.
doubly linked list
b.
singly linked list
c.
none of these
d.
circular linked list
Clear my choice
Question 4
Answer saved
Marked out of 1.00
Flag question
Question text
Each node in singly linked list has _______ fields.
Select one:
a.
1
b.
4
c.
2
d.
3
Clear my choice
Question 5
Answer saved
Marked out of 1.00
Flag question
Question text
This indicates the end of the list.
Select one:
a.
Last pointer
b.
End pointer
c.
Sentinel
d.
Guard
Clear my choice
Question 6
Answer saved
Marked out of 1.00
Flag question
Question text
A linear list in which the last node points to the first node.
Select one:
a.
circular linked list
b.
doubly linked list
c.
singly linked list
d.
none of these
Clear my choice
Question 7
Answer saved
Marked out of 1.00
Flag question
Question text
This may take place only when there is some minimum amount or no space left in free storage
list.
Select one:
a.
Memory management
b.
Maintenance
c.
Garbage collection
d.
Recycle bin
Clear my choice
Question 8
Answer saved
Marked out of 1.00
Flag question
Question text
The dummy header in linked list contains ____________________.
Select one:
a.
middle record of the actual data
b.
first record of the actual data
c.
last record of the actual data
d.
pointer to the last record of the actual data
Clear my choice
Question 9
Answer saved
Marked out of 1.00
Flag question
Question text
This is a linear list in which insertions and deletions are made to form either end of the structure.
Select one:
a.
Random of queue
b.
Circular queue
c.
Priority
d.
Dequeue
Clear my choice
Question 10
Answer saved
Marked out of 1.00
Flag question
Question text
What is a run list?
Select one:
a.
number of elements having same value
b.
number of files in external storage
c.
number of records
d.
small batches of records from a file