Week 3 Discussion Forum

Linear search steps

Linear search steps

by Shariar Kabir Nayeem 192-15-2854 -
Number of replies: 0

Step 1 - Does the item match the value I’m looking for?

Step 2 - If it does match return, you’ve found your item!

Step 3 - If it does not match advance and repeat the process.

Step 4 - Reached the end of the list and still no value found? Well obviously the item is not in the list! Return -1 to signify you have not found your value.

66 words