NEW
Font size
WorksheetsHackathon Quiz 22-03-2020
Total questions: 5
Worksheet time: 5mins
Quick Sort uses ______________ technique
interchange
divide and conquer
O(log n)
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);
}
Prints all nodes of linked lists
Prints all nodes of linked list in reverse order
Prints alternate nodes of Linked List
Prints alternate nodes in reverse order
Which of the following sorting algorithms can be used to sort a random linked list with minimum time complexity?
Insertion Sort
Quick Sort
Heap Sort
Merge Sort
What does the following piece of code do?
for(int i = 0; i < row; i++)
{
for(int j = 0; j < column; j++)
{
if(i == j)
sum = sum + (array[i][j]);
}
}
System.out.println(sum);
normal of a matrix
trace of a matrix
square of a matrix
transpose of a matrix
Which data structure can be used to test a palindrome?
tree
heap
stack
priority queue
