What is linear search, and how does it work? Provide an example of when linear search is a suitable choice.
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Other
Overview: Asks you to explain how linear search works and to give a case where it is the right tool. Tests whether you can state its best, average and worst case cost and judge when sorting, binary search or a hash table would pay off instead.