Test - Learning Outcome 1 - PGR206-1 23H Data Structures and Algorithms
Test - Learning Outcome 1 - PGR206-1 23H Data Structures and Algorithms
Instructions
Dear Students,
You will have 20 multiple-choice questions and 30 minutes to complete the test! This test will be included
in approved/not approved. To pass the test you will need at least 40% correct answers.
Best Wishes!
Attempt History
Attempt Time Score
LATEST Attempt 1 27 minutes 19 out of 20
Question 1 1 / 1 pts
https://kristiania.instructure.com/courses/11154/quizzes/19973 1/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Question 2 1 / 1 pts
Wastage of memory if the elements inserted in an array are lesser than the
allocated size
Question 3 1 / 1 pts
https://kristiania.instructure.com/courses/11154/quizzes/19973 2/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Add
Push
Insert
Question 4 1 / 1 pts
When the user tries to delete the element from the empty stack then the
condition is said to be a ____
Garbage collection
Underflow
Overflow
Question 5 1 / 1 pts
https://kristiania.instructure.com/courses/11154/quizzes/19973 3/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
If the size of the stack is 10 and we try to add the 11th element in the
stack then the condition is known as___
Garbage collection
Underflow
Overflow
Because the stack is full with its 10 elements, inserting one more
element in a stack will lead to the stack overflow.
Question 6 1 / 1 pts
Which of the following is not the correct statement for a stack data
structure?
Question 7 1 / 1 pts
https://kristiania.instructure.com/courses/11154/quizzes/19973 4/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
If the elements '1', '2', '3' and '4' are added in a stack, so what would be
the order for the removal?
2134
1234
4321
because stack follows LIFO, which means that the element inserted
at the last will be removed first.
Question 8 1 / 1 pts
If the elements '1', '2', '3' and '4' are inserted in a queue, what would be
order for the removal?
1234
The queue follows the FIFO principle in which the element inserted
first will be removed first.
4321
3241
Question 9 1 / 1 pts
https://kristiania.instructure.com/courses/11154/quizzes/19973 5/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Linear Queue
Queue has two ends in which one end is used for the insertion and
another end is used for the deletion. Therefore, it is not possible for
the Queue to have a single ended queue.
Circular Queue
Question 10 1 / 1 pts
rear = front+1
rear=MAX_SIZE -1
rear = front
rear = MAX_SIZE
https://kristiania.instructure.com/courses/11154/quizzes/19973 6/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Question 11 1 / 1 pts
Which of the following that determines the need for the Circular Queue?
Question 12 1 / 1 pts
Which of the following statement is not true about the doubly linked list?
Implementation of doubly linked list is easier than the singly linked list
https://kristiania.instructure.com/courses/11154/quizzes/19973 7/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Question 13 1 / 1 pts
void solve()
stack<int> s;
s.push(1);
s.push(2);
s.push(3);
System.out.println(s.top());
s.pop();
321
123
https://kristiania.instructure.com/courses/11154/quizzes/19973 8/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Question 14 1 / 1 pts
Digraph
Direct graph
Dir-graph
Directed graph
Question 15 1 / 1 pts
Last nodes
Terminal/External nodes
End nodes
Final nodes
Question 16 1 / 1 pts
The five items:A,B,C,D, and E, are pushed in a stack, one after the other,
starting from A.The stack is popped four times, and each element is
https://kristiania.instructure.com/courses/11154/quizzes/19973 9/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
inserted in a queue.Then two elements are deleted from the queue and
pushed back on the stack.Now one item is popped from the stack.
The popped item is
Question 17 1 / 1 pts
2,1,2,2,1
2,1,2,2,2
2,2,1,1,2
2,2,1,2,2
https://kristiania.instructure.com/courses/11154/quizzes/19973 10/12
9/13/23, 3:48 PM Test: Learning Outcome 1: PGR206-1 23H Data Structures and Algorithms
Question 18 1 / 1 pts
Question 19 1 / 1 pts
non-leaf node
adjacent node
Sibblings
leaf node
Incorrect
Question 20 0 / 1 pts
In an array
In a structure
https://kristiania.instructure.com/courses/11154/quizzes/19973 12/12