Data Structures and Algorithms 1 Complete Midterm by Mhel
Data Structures and Algorithms 1 Complete Midterm by Mhel
Data Structures and Algorithms 1 Complete Midterm by Mhel
Flag question
Question text
Fill in the following table, using Big-O notation to give the worst and average-case times for
each of the stack methods for a stack of size N.
OPERATION WORST-CASE TIME AVERAGE-CASE TIME
constructor O(1) O(1)
Answer Answer
empty O(1) O(1)
Answer Answer
size O(1) O(1)
Answer Answer
push O(N) O(1)
Answer Answer
pop O(1) O(1)
Answer Answer
peek O(1) O(1)
Answer Answer
PS: LETTER O PO YAN HINDI ZERO
Question 1
Complete
Mark 1.00 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. Random of queue
c. Dequeue
d. Circular queue
Question 2
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. -1
b. 1
c. 2
d. 0
Question 3
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. array
b. trees
c. stacks
d. lists
Question 4
Complete
Mark 1.00 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. Avail
c. Start
d. Begin
Question 5
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Alternative
b. Reverse
c. Sequential
d. Hierarchical
Question 6
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. push
b. access
c. pop
d. retrieval
Question 7
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Grounded header list
b. List traversed in two directions
c. Circular header list
d. Linked list with header and trailer nodes
Question 8
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Graph
b. Tree
c. Edge
d. List
Question 9
Complete
Mark 1.00 out of 1.00
Flag question
Question text
A linear list in which the pointer points only to the successive node.
Select one:
a. circular linked list
b. doubly linked list
c. none of these
d. singly linked list
Question 10
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. REAR
b. TOP
c. FIRST
d. AVAIL
Question 1
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. FIFO
b. None of these
c. Both of these
d. LIFO
Feedback
Question 2
Complete
Mark 1.00 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. Start field
b. Info field
c. Link field
d. Next element field
Feedback
Question 3
Complete
Mark 1.00 out of 1.00
Flag question
Question text
A linear list in which the last node points to the first node.
Select one:
a. none of these
b. singly linked list
c. circular linked list
d. doubly linked list
Feedback
Flag question
Question text
Select one:
a. LRU
b. LIFO
c. FIFO
d. RANDOM
Feedback
Question 5
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. last record of the actual data
b. pointer to the last record of the actual data
c. first record of the actual data
d. middle record of the actual data
Feedback
Your answer is correct.
Question 6
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Pump
b. Pop
c. Pull
d. Push
Feedback
Question 7
Complete
Mark 1.00 out of 1.00
Flag question
Question text
This form of access is used to add and remove nodes from a queue.
Select one:
a. Both of these
b. None of these
c. LIFO, Last In First Out
d. FIFO, First In First Out
Feedback
Question 8
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Overflow
b. Houseful
c. Saturated
d. Underflow
Feedback
Question 9
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. REAR
b. FIRST
c. FRONT
d. TOP
Feedback
Question 10
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. 3
b. 4
c. 1
d. 2
Feedback
Question 1
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. TOP
b. AVAIL
c. FIRST
d. REAR
Feedback
Question 2
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. The new node is placed at the front of the linked list
b. No changes happen
c. The new node is placed at the back of the linked list
d. The new node is placed at the middle of the linked list
Feedback
Question 3
Complete
Mark 1.00 out of 1.00
Flag question
Question text
LINK is the pointer pointing to the ____________________.
Select one:
a. last node
b. predecessor node
c. successor node
d. head node
Feedback
Question 4
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. LIFO
b. None of these
c. Both of these
d. FIFO
Feedback
Question 5
Complete
Mark 1.00 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. Dequeue
c. Circular queue
d. Priority
Feedback
Question 6
Complete
Mark 1.00 out of 1.00
Flag question
Question text
A linear list in which the pointer points only to the successive node.
Select one:
a. singly linked list
b. none of these
c. circular linked list
d. doubly linked list
Feedback
Question 7
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. 3
b. 1
c. 4
d. 2
Feedback
Question 8
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Saturated
b. Overflow
c. Houseful
d. Underflow
Feedback
Flag question
Question text
Select one:
a. top
b. rear
c. list
d. front
Feedback
Question 10
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. finding factorial
b. all of these
c. infix to postfix
d. tower of Hanoi
Feedback
Your answer is correct.
Question 11
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. FIFO
b. RANDOM
c. LIFO
d. LRU
Feedback
Question 12
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. push
b. pop
c. pump
d. pull
Feedback
Question 13
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Pop
b. Pump
c. Pull
d. Push
Feedback
Question 14
Complete
Mark 1.00 out of 1.00
Flag question
Question text
A linear list in which the last node points to the first node.
Select one:
a. singly linked list
b. circular linked list
c. doubly linked list
d. none of these
Feedback
Question 15
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. lists
b. trees
c. stacks
d. array
Feedback
Question 16
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. linear doubly linked list
b. circular linked list
c. linked list
d. single linked list
Feedback
Question 17
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. access
b. push
c. pop
d. retrieval
Feedback
Question 18
Complete
Mark 1.00 out of 1.00
Flag question
Question text
The dummy header in linked list contains ____________________.
Select one:
a. first record of the actual data
b. last record of the actual data
c. middle record of the actual data
d. pointer to the last record of the actual data
Feedback
Question 19
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. number of elements having same value
b. small batches of records from a file
c. number of records
d. number of files in external storage
Feedback
Question 20
Complete
Mark 1.00 out of 1.00
Flag question
Question text
What is a queue?
Select one:
a. LOFI
b. FIFO
c. FILO
d. LIFO
Feedback
Question 21
Complete
Mark 1.00 out of 1.00
Flag question
Question text
In linked representation of stack, ___________ fields hold the elements of the stack.
Select one:
a. LINK
b. INFO
c. TOP
d. NULL
Feedback
Question 22
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. for none of these situations
b. data structure
c. for relatively permanent collections of data
d. for the size of the structure and the data in the structure are constantly changing
Feedback
Question 23
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Two fields
b. Four fields
c. Three fields
d. Five fields
Feedback
Flag question
Question text
Select one:
a. Back
b. Front and Back
c. Middle
d. Front
Feedback
Question 25
Complete
Mark 1.00 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. Link field
b. Next element field
c. Info field
d. Start field
Feedback
Your answer is correct.
Question 26
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Alternative
b. Sequential
c. Hierarchical
d. Reverse
Feedback
Question 27
Complete
Mark 1.00 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. Beginning of the stack
b. Bottom of the stack
c. Middle of the stack
d. In between some value
Feedback
Question 28
Complete
Mark 1.00 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. End
b. Final
c. Top
d. Last
Feedback
Question 29
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. merging
b. sorting
c. traversal
d. inserting
Feedback
Question 30
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. List
b. Edge
c. Graph
d. Tree
Feedback
Question 31
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Question 32
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Maintenance
b. Garbage collection
c. Recycle bin
d. Memory management
Feedback
Question 33
Complete
Mark 1.00 out of 1.00
Flag question
Question text
This indicates the end of the list.
Select one:
a. End pointer
b. Last pointer
c. Sentinel
d. Guard
Feedback
Question 34
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. push
b. top
c. insert
d. pop
Feedback
Question 35
Complete
Mark 10.00 out of 10.00
Flag question
Question text
Fill in the following table, using Big-O notation to give the worst and average-case times for
each of the stack methods for a stack of size N.
Question 36
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. TOP
b. REAR
c. FIRST
d. FRONT
Feedback
Question 37
Complete
Mark 1.00 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. Avail
b. Stop
c. Start
d. Begin
Feedback
Question 38
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. Linked list with header and trailer nodes
b. List traversed in two directions
c. Circular header list
d. Grounded header list
Feedback
Your answer is correct.
Question 39
Complete
Mark 1.00 out of 1.00
Flag question
Question text
Select one:
a. -1
b. 1
c. 2
d. 0
Feedback
Question 40
Complete
Mark 1.00 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. first
c. anywhere in between
d. last
Feedback
Question 41
Complete
Mark 1.00 out of 1.00
Flag question
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
Feedback