|
List->Static list->Key Search |
||
| Key Search:- Well, KEY is just a particular element you want to search in a LIST. It might be there or might not be even. If its there you are supposed to return the position (i.e its INDEX value) or else say "NOT there". See, I might be tackling this very lightly as per you, but don't worry SEARCHING a Key has been covered properly in my last section of this tutorial. For now, we will discuss, what you call a
"Sequential Search". Algorithm:- Let us see its C implementation:- int list[listsize]; Note:- This searching would take a worst case of N comparisons to search a KEY in a LIST of size N. Related Operations: |
||
|
Index || Doubts / Clarifications || Related Topics || Web Links |
||