How I implemented Linear Search in JAVA ?
In computer science, a linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched.
From my code, i tried to show the algorithm of Linear Search in two different ways :
- By using String Input
- By using Arrays input
Note: This is how I implemented and maybe there are some room for improvement. If you have any suggestion please let me. Thanks