Which are true of Selection Sort? please explain
Multiple answers:You can select more than one option
A) It uses Θ(n^2) comparisons in the worst case
B) It uses Θ(n^2) comparisons in the average case
C) It uses Θ(n^2) comparisons in the best case
D) It uses Θ(n^2) swaps in the worst case
E) It uses Θ(n^2) swaps in the average case
F) It uses Θ(n^2) swaps in the best case
Selection Sort: Selection is a in place sorting algorithm. Selection sort work s like find minimum element in the array and move it to the start of the array like find the minimum element in the array and move it to 0 index and then check for next minimum in the remaining array which n-1 elements.After that find minimum element place it in 1 index and check in rest n-2 elements in the array and move to the first and continue this.
For any array we need to compare one element with all other elements so the time complexity and comparisions are n^2 in all the cases
SOLUITON: A, B, C
EXPLANATION OF ANSWER OPTIONS: A, B, C As explained above we need to compare every element with all other elements so the number of comparisions constant for all the cases that is n^2
EXPLANATION OF INCORRECT OPTIONS:
D: Worst case is like all elements are not in correct order. In selection Sort we will sort at every pass in the array and we will swap at the end of the pass by finding minimum element so it is n-1 only so this option is wrong
E: Average case is like some elements are in correct order like sorted order only so it is less than n-1 so this option is wrong
F: Best case is like all are in correct order so number of swaps are 1 so this option is wrong
Which are true of Selection Sort? please explain Multiple answers:You can select more than one option...
Insertion Sort Which are true of Insertion Sort (traditional implementation, without optimizations)? Multiple answers:You can select more than one option. Please, include the explanation with the answer. A) It uses Θ(n^2) comparisons in the worst case B) It uses Θ(n^2) comparisons in the average case C) It uses Θ(n^2) comparisons in the best case D) It uses Θ(n^2) movements of elements in the worst case E) It uses Θ(n^2) movements of elements in the average case F) It uses Θ(n^2)...
1. Randomized Binary Search Which are true of the randomized Binary Search algorithm? Multiple answers:You can select more than one option A) It uses a Variable-Size Decrease-and-Conquer design technique B) Its average case time complexity is Θ(log n) C) Its worst case time complexity is Θ(n) D) It can be implemented iteratively or recursively E) None of the above 2. Randomized Binary Search: Example Assume you have an array, indexed from 0 to 9, with the numbers 1 4 9...
Which of the following is true? Multiple answers: You can select more than one option ОА x^3 =Big-Theta(x^4 + x^3) B x^4 =Big-Theta(x^3 + x^4) O с x^3 =Big-Theta(x^3 + 4x +17) O D x^3 + 4x +17 =Big-Theta(x^3) o E 3^n = Big-Theta(2^n) O F 2^n =Big-Theta(3^n) Among 100 people, there are at least 8 of them born in each month. А True O B False What is the divisibility rule for 4? O А Check whether sum of...
You can select more than one option Source of additional atoms in guanylate synthesis from IMP is/are: Homework. Unanswered. Due in 14 hours Click on all that apply: Multiple answers: You can select more than one option O A water O B carbamoyl phosphate O aspartate 0 D glutamine O E NAD+ O F glutamate Unanswered Submit
Which of the following is NOT a mechanism by which pathogens resist phagocytosis? Multiple answers:You can select more than one option A Capsule production B Production of f-met C Produce biofilms D Decorate their own cell surface with molecules typically found on host cells E Use of efflux pumps F Production of leucocidin
please Type your answer! thanks ting a true false. You (1) Mark the following assertions about sorting at need to explain your answers. (a) (2 points) BubbleSort can be implemente time in N(n). Semented to have a better (b) (2 points) Selection Sort has a worst-case as a worst-case running time in Oslo (e) (2 points) The recursive version or benary search than the non-recursive version. (d) (2 points) The worst-case time complexity of NergeSortising ( a s ( points)...
What is/are a characteristic/s of an ideal solution? Multiple answers: You can select more than one option A) They follow the ideal gas law B) There is no heat exchanged when mixed C) Only solutions with weak intermolecular forces are ideal solutions D) Only solutions with strong intermolecular forces are ideal solutions E) Intermolecular force strengths between solvent and solute particles are similar
Which of the following statements are true? (hint: There might be more than one True statement) © Multiple answers: You can select more than one option O A Exons are intervening regions in genes O B Enhancers might be present in the middle of a gene oc RNA polymerase translates mRNA into protein O D Poly Atails are added to the 5' (five prime) end of mRNAs O E Enhancers might be present downstream of a gene
Subject: Algorithm. solve only part 3 and 4 please. 2.2 Selection- 5 points each 1. Run the simultaneous min-and-max algorithm on the array A 4, 2, 12, 6, 13,9,15). (16, 7, 10, 1,5, 11,3,8, 14, 2. Explain why the above algorithm is better than the naive algorithm for finding minimum and maximum separately. How many comparisons does the naive algorithm do? How many comparisons does the simultaneous min and max do? 3. Use the randomized select algorithm based on partition...
Which of the following statements about the Merge Sort algorithm is True? Select one: Merge Sort uses list concatenation to join sublists. Merge Sort runs in O(na) time. Merge Sort only works if the input list is in sorted order. O Merge Sort will take longer to sort a given list into descending order than into ascending order. None of the above, they are all False.