What is linear searching?

Added 3 years ago
Active
Viewed 1247
Ans

Linear search tries to find an item in a sequentially arranged data type. These sequentially arranged data items known as array or list, are accessible in incrementing memory location.

Linear search compares expected data item with each of data items in list or array. The average case time complexity of linear search is Ο(n) and worst case complexity is Ο(n^2). Data in target arrays/lists need not to be sorted.



Related Questions