×

Linear Search Visualisation using Drop the Bomb Game

park Park
temple Temple
school School
hospital Hospital
bus Bus Stop
railway Railway
Mall
Search Again ↺

What's your Status, Cop?

Click Here ^_~ bomb icon

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]
  • Step 6: EXIT