The correct options are
A - InsertionSort
B - MergeSort
C - BubbleSort
D - QuickSort
E - None
F - SelectionSort
Explaination:
A - InsertionSort
We know that Insertion sort maintains a sorted sub-list, it compares between two elements sequentially and swaps them, and also in turn compares with all the other elements in the sub-list.
This way we get Alfa, Bravo, Juliett, Kilo, Lima, Papa...
B - MergeSort
We know that Merge sort divides the values until one element is remaining, and merges them back by sorting each pair. It's mentioned in the problem that top half is sorted first, hence Option B. Until Papa is the top sorted half.
C - BubbleSort
It compares two elements and swaps, repeats until everything is sorted. C is correct for this.
D - QuickSort
In quick sort, one element is taken as pivot, left pointer keeps increasing till it finds an element greater than the pivot. Right pointer decreases till it finds an element lesser than pivot and then both are swapped. This is continued till both pointers crossover and the right pointer is replaced with pivot. In our case Juliett is the pivot, so after performing quicksort it should be placed in the correct place. Hence D is the option.
E- None of the above
F- SelectionSort
The lowest values are selected from the unsorted array and kept in the sorted array. This pattern is seen in F.
comment for any further clarifications!
Alfa The first column in the table below contains an unsorted list of words. The last...
If the two signal handling functions in 3000pc were replaced by one function, would there be any significant loss of functionality? Briefly explain /* 3000pc.c */ 2 3 4 5 6 7 8 #include <stdio.h> 9 #include <stdlib.h> 10 #include <unistd.h> 11 #include <sys/mman.h> 12 #include <errno.h> 13 #include <string.h> 14 #include <sys/types.h> 15 #include <sys/wait.h> 16 #include <semaphore.h> 17 #include <string.h> 18 #include <time.h> 19 20 #define QUEUESIZE 32 21 #define WORDSIZE 16 22 23 const int wordlist_size =...