WorksheetsWorkshop Day 2
Total questions: 10
Worksheet time: 3mins
To represent hierarchical relationship between elements, which data structure is suitable
Priority
Tree
Dequeue
All of the above
Which data structure allows deleting data elements from front and inserting at rear
Queue
Stack
Binary search tree
Dequeue
Which of the following is not a disadvantage to the usage of array
Fixed size
There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
Insertion based on position
Accessing elements at specified positions
Elements in an array are accessed
randomly
sequentially
exponentially
logarithmically
How can you measure the efficiency of an the algorithm?
Processor and memory
Complexity and capacity
Time and space
Data and space
How can we measure the time factor when determining the efficiency of the algorithm
Counting microseconds
Counting the number of key operations
Counting the number of statements
Counting the number of statements
The complexity theory does not contain the following case, which is
Best Case
Average Case
Worst Case
Null Case
What is the time complexity for inserting/deleting at the beginning of the array
O(1)
O(n)
O(logn)
O(nlogn)
What is the worst case time complexity of inserting an element into the sorted array
O(nlogn)
O(1)
O(n)
O(logn)
Which of the following statement(s) about stack data structure is/are NOT correct
Linked List are used for implementing Stacks
Top of the Stack always contain the new node
Stack is the FIFO data structure
Null link is present in the last node at the bottom of the stack
