wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

finalewalads

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
You want to update kth element of array "a" to 5. Which is correct syntax ?
a)
a[k]=5;
b)
a[k+1]=5;
c)
a[5]=k;
d)
a[k-1]=5;
2.
The complexity of Binary search algorithm is
a)
O(n)
b)
O(log n)
c)
O(n log n)
d)
None of the above
3.
A data structure where elements can be added or removed at either end but not in the middle is referred as
a)
Linked lists
b)
Stacks
c)
Queues
d)
Deque
4.
Two main measures for the efficiency of an algorithm are
a)
Time and space
b)
Processor and memory
c)
Complexity and capacity
d)
Data and space
5.
Which data structure is needed to convert infix notation to postfix notation?
a)
Tree
b)
Array
c)
Stack
d)
Queue
6.
The data structure required for Breadth First Traversal on a graph is?
a)
Array
b)
Stack
c)
Tree
d)
Queue
7.
What is an AVL tree?
a)
a tree which is NOT a binary search tree and is a height balanced tree
b)
a tree which is binary search tree and is a height balanced tree
c)
a tree with atmost 3 children
d)
a tree with three children
8.
What is the number of edges present in a complete graph having n vertices?
a)
(n*(n+1))/2
b)
(n*(n-1))/2
c)
n
d)
Information given is insufficient
9.
What is the worst case time complexity of inserting a node in a doubly linked list?
a)
O(nlogn)
b)
O(logn)
c)
O(n)
d)
O(1)
10.
Which of the following application makes use of a circular linked list?
a)
Undo operation in a text editor
b)
Recursive function calls
c)
graph representation
d)
Preparing a music player
11.
Which of the following is not a disadvantage to the usage of array?
a)
Fixed size
b)
There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
c)
Insertion based on position
d)
Accessing elements at specified positions
12.
What are the disadvantages of arrays?
a)
Data structure like queue or stack cannot be implemented
b)
There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
c)
Index value of an array can be negative
d)
Elements are sequentially accessed
13.
Elements in an array are accessed _____________
a)
randomly
b)
sequentially
c)
exponentially
d)
logarithmically
14.
What is a dynamic array?
a)
A variable size data structure
b)
An array which is created at runtime
c)
The memory to the array is allocated at runtime
d)
An array which is reallocated everytime whenever new elements have to be added
15.
Linked list is considered as an example of ___________ type of memory allocation.
a)
Dynamic
b)
Static
c)
Compile time
d)
Heap