WorksheetsDS- UNIT-1
Total questions: 20
Worksheet time: 11mins
How do you measure of the time complexity?
Big-O notation
Big-N notation
N notation
Small-O notation
What is the value of the postfix expression 6 3 2 4 + – *:
1
14
74
-18
___ dynamic memory function allocates memory continually
malloc()
calloc()
realloc()
all of the above
the size of the dynamically allocated arrays can't be increased while inserting an element
ture
false
Which of the following sorting algorithm will use tree structure for sorting elements
quick sort
merge sort
heap sort
selection sort
What is the problems with fixed array sizes?.
Exceeding the maximum
Use of For Loops
Use of indexes to access the array
None
Which sorting algorithm is more efficient with longer lists of data?
Merge Sort
Bubble Sort
Both
Neither
Which of the following is NOT a stable sorting algorithm in its typical implementation.
Insertion sort
Bubble sort
Merge sort
Quick sort
None
Identify the sorting algorithm that apply divide-and-conquer method.
Linear Sort
Merge Sort
Heap Sort
Binary Sort
Suppose we are sorting an array of eight integers using quick sort, and we have just finished the first partitioning with the array looking like this:
2 5 1 7 9 12 11 10
Identify the correct statement?
Neither the 7 nor the 9 is the pivot.
The pivot could be either the 7 or the 9.
The pivot is not the 7, but it could be the 9.
The pivot could be the 7, but it is not the 9.
Identify the types of sorting that used partition and exchange sort.
Bubble sort
Selection sort
Quick sort
Merge sort
What is the worst-case complexity of Quick Sort?
O(n2)
O(n*log n)
O(2*log n)
O(n2)^2
What is pseudocode?
Another way to write an algorithm.
Uses symbols to represent an algorithm
source code
binary code
In heap sort , to sort the elements in ascending order which heap tree will be used
min heap tree
max heap tree
min heap tree or max heap tree
none
