NEW
Font size
WorksheetsTrees, Linked Lists, Stacks and Queues
Total questions: 30
Worksheet time: 19mins
What is the value of the ROOT node in this Tree?
35
24
42
20
Root
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
Tree
data structure similar to a graph, with no loops.
an object in a graph also known as a vertex
a join of relationship between nodes - also know as an arc
the starting node in a rooted tree structure from which all other nodes branch off./
How many leaves are there in this tree?
1
3
4
7
Process of inserting an element in stack is called ____________
Create
Push
Evaluation
Pop
If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?
a) ABCD
b) DCBA
c) DCAB
d) ABDC
To represent hierarchical relationship between elements, Which data structure is suitable?
Dequeue
Priority
Tree
Graph
The following array is created in a program: " DIREWOLVES = ["Nymeria","Shaggy Dog","Ghost","Lady","Grey Wind","Summer"]
What is the item stored in DIREWOLVES [2] ?
"Shaggy Dog"
"Ghost"
What does the term immutable mean?
unable to be changed
unable to speak
can be modified
can be increased in size
Which data structure cannot have elements of different data types?
Array
Tuple
Record
Stack
Queue
What type of data structure is an array?
Static and mutable
Dynamic and immutable
Static and immutable
What is the value of the ROOT node in this Tree?
2
7
11
43
There are two types of data structures, they are
Static and dynamic
Fast and slow
Large and small
Ascending and descending
Which of the following usees FIFO method
Queue
stack
linklist
binary tree
This form of access is used to add and remove nodes from a queue.
LIFO, Last In First Out
FIFO, First In First Out
Both a and b
none
Consider the following operation performed on a stack of size 5.
Push(1);
Pop();
Push(2);
Push(3);
Pop();
Push(4);
Pop();
Pop();
Push(5);
After the completion of all operation, the number of elements present on stack are
1
2
3
4
What is the reason for using a circular queue instead of a regular queue?
running time of enqueue is improved
reuse empty space
you can traverse the elements more efficiently
none of the above
If FRONT pointer= REAR pointer then the queue is?
overflow
underflow
empty
null
q=Queue()
q.enQueue(‘a’)
q.enQueue(‘b’)
q.deQueue()
q.enQueue(‘c’)
q.enQueue(‘d’)
What element does the front pointer points to?
'a'
'b'
'c'
'd'
q=Queue()
q.enQueue(‘a’)
q.enQueue(‘b’)
q.deQueue()
q.enQueue(‘c’)
q.enQueue(‘d’)
What element does the rear pointer point to?
'a'
'b'
'c'
'd'
