Enter the values and press "Show" to show the entered data
To search any element, enter that and press "Start"
Please don't enter any new search while one is Searching
×
Linear Search Visualisation using Drop the Bomb Game
This [Drop the Bomb] interface is a gamified approach to illustrate the working of linear Search algorithm.
In this interface there is a Cop present on the left most side of the user screen (beside all the places in a city).
The list of places will act like elements in an array.
You as a user will drop a bomb to one of the given places similar to entering an element
to search it in the array using Linear search approach.
Upon placing the bomb the Cop will start moving towards each place from its initial position.
The Cop will move and search for the bomb at each place that will take some time similar to finding an element in an array.
If the cop reaches the location where bomb was planted it will glow with Green color showing SUCCESS.
If it fails finding the bomb at a given place it will glow in Red showing FAILURE. and will move towards next place.
Search Again ↺
What's your Status, Cop?
Click Here ^_~
Linear Search Visualisation
Current Algorithm steps explaination will appear here
Enter the values to perform Linear Search
Step-by-Step Code Run
LINEAR_SEARCH(A, N, VAL)
Step 1: [INITIALIZE] SET POS = -1
Step 2: [INITIALIZE] SET I = 1
Step 3: Repeat Step 4 while I<=N
Step 4: IF A[I] = VAL SET POS = I PRINT POS Go to Step 6 [END OF
IF] SET I = I + 1 [END OF LOOP]
Step 5: IF POS = -1 PRINT " VALUE IS NOT PRESENTIN THE ARRAY "
[END OF IF]