| Fråga   | Svar   | 
        
        |  börja lära sig What does a bubble sort do?  |  |   Sorts a list by comparing two items that are side by side, to see which is out of order  |  |  | 
|  börja lära sig Consider the following sorting algorithms. I. Quicksort and II. Mergesort Which of them perform in least time in the worst case?  |  |  |  |  | 
|  börja lära sig Which of the following algorithm design technique is used in merge sort?  |  |  |  |  | 
|  börja lära sig You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task?  |  |  |  |  | 
|  börja lära sig Consider an array of elements arr[5]= {5,4,3,2,1}, what are the steps of insertions done while doing insertion sort in the array.  |  |   4 5 3 2 1 3 4 5 2 1 2 3 4 5 1 1 2 3 4 5  |  |  | 
|  börja lära sig In a max-heap, element with the greatest key is always in the which node?  |  |  |  |  | 
|  börja lära sig The worst case complexity of deleting any arbitrary node value element from heap is  |  |  |  |  | 
|  börja lära sig An array consists of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of  |  |  |  |  | 
|  börja lära sig Heap exhibits the property of a binary tree?  |  |  |  |  | 
|  börja lära sig What is the complexity of adding an element to the heap?  |  |  |  |  | 
|  börja lära sig What is the time complexity to get the max element in a heap?  |  |  |  |  | 
|  börja lära sig The Process of inserting an element in stack is called  |  |  |  |  | 
|  börja lära sig Process of removing an element from stack is called __________  |  |  |  |  | 
|  börja lära sig Pushing an element into stack already having five elements and stack size of 5, then stack becomes  |  |  |  |  | 
|  börja lära sig Entries in a stack are “ordered”. What is the meaning of this statement?  |  |   There is a Sequential entry that is one by one  |  |  | 
|  börja lära sig Which of the following is not the application of stack?  |  |   Data Transfer between two asynchronous process  |  |  | 
|  börja lära sig A queue follows __________  |  |   FIFO (First In First Out) principle  |  |  | 
|  börja lära sig A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as _____________  |  |  |  |  | 
|  börja lära sig 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?  |  |  |  |  | 
|  börja lära sig A normal queue, if implemented using an array of size MAX_SIZE, gets full when?  |  |  |  |  | 
|  börja lära sig A stack follows __________  |  |  |  |  | 
|  börja lära sig Which of the following is not an advantage of a priority queue?  |  |   Easy to delete elements in any case  |  |  | 
|  börja lära sig What is the time complexity to insert an element in a priority queue?  |  |  |  |  |