Basic Searching technique: The searching means we are finding particular location of a given array elements. In searching if we find any particular than it called successfully found the element other not found element in given a list. Searching technique we are apply on sorted or unsorted list of elements. There are three basic searching techniques are as following:
1. Index searching
2. Sequential searching
3. Binary searching
1 Index searching: Index searching can be applied on array. Lets look how it works. Index 0 1 2 3 4
x 4 2 6 9 8
If we search index 3rd element than search start at 0th index
Step 1 we are comparing zero index, but our index 3. So, do not match.
index 0 1 2 3 4
x 4 2 6 9 8
Step 2 we are comparing first index, but our index 3. So, do not match.
Index 0 1 2 3 4
x 4 2 6 9 8
Step 3 we are comparing second index, but our index 3 . So, do not match.
Index 0 1 2 3 4
x 4 2 6 9 8
Step 4 we are comparing third index and that our search index match.
Index 0 1 2 3 4
x 4 2 6 9 8
Advantages of index searching as follow:
1. It is very simple searching technique.
2. It is very easy to implementation when list are small.
3. It is works on both sorted and unsorted list.
Disadvantage s of index searching is as follow:
1. Large list not handing by this searching technique.
2. It is very inefficient searching technique.