Search Algorithms Basics

The 'Search Algorithms Basics' test covers key questions on linear and binary search, including their complexity and applications. It also addresses recursive approaches and their advantages and disadvantages.

Sample Questions

  1. Which search algorithm checks each element in a list one by one until the target is found?

    • Linear Search
    • Binary Search
    • Depth-First Search
    • Breadth-First Search
  2. What is the time complexity of linear search in the worst case?

    • O(n^2)
    • O(n)
    • O(1)
    • O(log n)
  3. Which search algorithm requires the data to be sorted?

    • Linear Search
    • Interpolation Search
    • Binary Search
    • Jump Search