In this example it is presumed that the array/list has already been populated. In this example a label is used to output the result. It is possible to use other objects for output.
Because the linear search algorithm simply moves up the list and checks each item, the data in the list does not need to be in order. However, as the list gets longer the algorithm takes longer to ...