quiz

1.The number of nested loops in a bubble sort algorithm of

 

2. What is the worst case complexity for selection sort algorithm

 

3. In a selectionsort of n elements, how many times is the swap function is the swap function called in the complete execution of the algorithm? 

 

4. For insertion sort, the number of entries we must index through when there are n elements in the array is

 

5. What is the best case complexity for insertion sort algorithm

 

6. In which cases are the time complexities same in insertion sort?ties for processing all

Best and Average   Worst, verage and Best  

 

7. The following loop is used for
For i<- 1 to N
For j<- i+1 to N
If(a(i)>a(j))
{
Temp=a(i);
A(i)=a(j);
A(j)=temp;

 

8. Which of the following algorithm design technique is used for quick sort

Dynamic programming   Divide and conquer  

 

9. Straight selection sort is also called

10. The types of selection sort are

Pull-up selection sort