r/computerscience • • Sep 24 '25

does sequential search compare every element even if there is an absence?

like for example we have this list (1,5,17,40,92,100) and i want to see how many comparisons will it do to understand that the number 35 for example is missing. will it stop at 40 or will it go till the end of the list?

1 Upvotes

9 comments sorted by