NEW
Font size
Worksheetsdata structures1
Total questions: 20
Worksheet time: 10mins
If the insertion and deletion happens from both the ends then the queue is called a______Queue
a) Deque
b) Header
c) Queue
d) Circular Queue
Process of inserting an element in stack is called ____________
Create
Push
Evaluation
Pop
Entries in a stack are “ordered”. What is the meaning of this statement?
A collection of stacks is sortable
Stack entries may be compared with the ‘<‘ operation
The entries are stored in a linked list
There is a Sequential entry that is one by one
What is the value of the postfix expression 6 3 2 4 + – *:
1
14
74
-18
The data structure required to check whether an expression contains balanced parenthesis is?
a) Stack
b) Queue
c) Array
d) Tree
Circular Queue is also known as ________
a) Ring Buffer
b) Square Buffer
c) Rectangle Buffer
d) Curve Buffer
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
What does the following function do for a given Linked List with first node as head?
void fun1(struct node* head)
{
if(head == NULL)
return;
fun1(head->next);
printf("%d ", head->data);
}
a) Prints all nodes of linked lists
b) Prints all nodes of linked list in reverse order
c) Prints alternate nodes of Linked List
d) Prints alternate nodes in reverse order
Linked list data structure offers considerable saving in _____________
a) Computational Time
b) Space Utilization
c) Space Utilization and Computational Time
d) Speed Utilization
To represent hierarchical relationship between elements, Which data structure is suitable?
Dequeue
Priority
Tree
Graph
Match the following.
a) Completeness i) How long does it take to find a solution
b) Time Complexity ii) How much memory need to perform the search.
c) Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.
a-iii, b-ii, c-i
a-i, b-ii, c-iii
a-iii, b-i, c-ii
a-i, b-iii, c-ii
___________ is neither an algorithm nor a program.
a.Computing
b.Pseudo code
c.Computer science
d.None of the above
Efficiency of an algorithm is measured by
Time and Capacity complexity
Time and Space complexity
Speed and Space complexity
Speed and Capacity complexity
Data in the data structures are processed by operations like insertion, deletion, sorting, merging and
Traversing
Searching
Retrieval
Both A and B
To measure Time complexity of an algorithm Big O notation is used which:
A. describes limiting behaviour of the function
B. characterises a function based on growth of function
C. upper bound on growth rate of the function
D. all of the mentioned
If for an algorithm time complexity is given by O(1) then complexityof it is:
A. constant
B. polynomial
C. exponential
D. none of the mentioned
If for an algorithm time complexity is given by O(n) then complexityof it is:
A. constant
B. linear
C. exponential
D. none of the mentioned
Can We Implement Stack Using Queue Data structure
Yes
No
Can We implement Queue data structure using stack data structure
Yes
No
In a stack, if a user tries to remove an element from empty stack it is called _________
Underflow
Stack is Empty
Overflow
None of the above
