NEW
Font size
WorksheetsData Structure Quiz
Total questions: 10
Worksheet time: 5mins
Given pointer to a node X in a singly linked list. Only one pointer is given, pointer to head node is not given, can we delete the node X from given linked list?
Possible if X is not last node. Use following two steps (a) Copy the data of next of X to X. (b) Delete next of X.
Possible if size of linked list is even.
Possible if size of linked list is odd
Possible if X is not first node. Use following two steps (a) Copy the data of next of X to X. (b) Delete next of X
Queue is ____
fifo
Lifi
Both a and b
None of these
Tree is ____data structure
Linear
Non linear
Array
List
Which of the following points is/are true about Linked List data structure when it is compared with array
Arrays have better cache locality that can make them better in terms of performance.
It is easy to insert and delete elements in Linked List
Random access is not allowed in a typical implementation of Linked Lists
All of the above
You are given pointers to first and last nodes of a singly linked list, which of the following operations are dependent on the length of the linked list?
Delete the first element
Insert a new element as a first element
Delete the last element of the list
Add a new element at the end of the list
In the stack, If user try to remove element from the empty stack then it called as ___________.
Overflow of Stack
Empty Collection
Underflow of Stack
Garbage Collection
In order to keep track of current topmost element of the stack we need to maintain one variable.
Yes
No
Both Yes and No
None of the answer
Select a real life situation implement stack
All of the answers
The cars a garage the first car in will be the last car out of the garage
The batteries in a flashlight
The person wear bangles
Which of the following is true about linked list implementation of stack?
In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end.
In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning.
Both of the above
None of the above
The middle elements of a stack should not be accessed directly
true
false
