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

binary search
binary search

quicksort
quicksort

linear search
linear search

hashing

1 answer

The pseudocode provided represents a linear search algorithm.

In a linear search, the algorithm checks each element in the list sequentially until it finds the target element or reaches the end of the list, which is exactly what the pseudocode is doing by iterating through the list with a while loop and returning the index of the target element if it is found.

So, the correct response is linear search.