Which of the following sort algorithms is represented by the pseudocode? for all elements of list if list[i] > list[i+1] swap(list[i], list[i+1]) end if end for (1 point) Responses selection sort selection sort merge sort merge sort bubble sort bubble sort quicksort

5 answers

The pseudocode you provided describes the Bubble Sort algorithm.

In Bubble Sort, adjacent elements in the list are compared and swapped if they are in the wrong order. This process is repeated for each element until no more swaps are needed, indicating that the list is sorted.

So, the correct response is bubble sort.

Which of the following search algorithms is represented by the pseudocode? index = 0 WHILE (index < number of items in the list) { IF (list[index] == target element) { RETURN index } index = index+1 } (1 point) Responses hashing hashing binary search binary search quicksort quicksort linear search linear search

The pseudocode you provided describes the linear search algorithm.

In linear search, the algorithm iterates through each element of the list sequentially, comparing each element with the target element until it finds a match or reaches the end of the list.

So, the correct response is linear search.

Which of the following is a classic algorithm applied to modern cryptography?(1 point) Responses modular arithmetic modular arithmetic binary sort binary sort linear search linear search pseudorandom number generator

The classic algorithm that is widely applied to modern cryptography is modular arithmetic.

Modular arithmetic forms the basis of many cryptographic algorithms, including RSA and various symmetric key algorithms, enabling operations on integers with a defined modulus.

So, the correct response is modular arithmetic.