Linear Search Algorithm (Sequential Search)

¡Supera tus tareas y exámenes ahora con Quizwiz!

Step 1

Read the search element from the user

Step 5

Repeat steps 3 and 4 until the search element is compared with the last element in the list.

Step 3

If both are matching, then display "Given element found!!!" and terminate the function

Step 4

If both are not matching, then compare search element with the next element in the list.

Step 6

If the last element in the list is also doesn't match, then display "Element not found!!!" and terminate the function.

Step 2

Compare, the search element with the first element in the list.


Conjuntos de estudio relacionados

Antihyperlipidemics and Peripheral Vasodilators Bile-Acid Sequestrant and Fibrate Therapy

View Set

Chapter 2 - Near East Empires and the Reemergence of Civilization in Greece 1000-500 B.C.E. - The Making of The West - HIST 1111

View Set

Data Analytics and Visualization Final

View Set

Which of the following statements are true of the quantity weight?

View Set

Ch. 24- Asepsis and Infection Control

View Set

Integrated Marketing Communications Quiz 1

View Set

GENERAL INFO: Diffusion of Responsibility - The Bystander Effect (Darley & Latane, 1968)

View Set

AP Environmental Sciences - Unit 2

View Set