Search Algorithm Principles

The 'Search Algorithm Principles' test covers key questions on search strategies and optimization techniques. Topics include the differences between depth-first search and breadth-first search, as well as the efficiency of heuristic approaches.

Sample Questions

  1. Which search algorithm guarantees finding the shortest path in an unweighted graph?

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

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

    • Breadth-First Search
    • Depth-First Search
    • Binary Search
    • Linear Search