Estimated Time

1 hour

Learning Objectives of the Experiment

In this experiment, you will be able to do the following:

  • Given an unsorted array of numbers, search for a given element using Linear Search.
  • Explain why Linear Search can be applied directly to an unsorted array.
  • Understand the prerequisite of Binary Search and explain why the array must be sorted before Binary Search can be applied.
  • Use sorting as a preprocessing step and then apply Binary Search to search for elements efficiently.
  • Compare Linear Search with the combination of sorting and Binary Search in terms of time and auxiliary space complexity.
  • Understand the difference between the cost of a single search and the cost of performing multiple searches on the same data.
  • Analyze the number of operations performed by Linear Search and Binary Search and relate them to their asymptotic time complexities.
  • Understand the applications of searching and the need for efficient searching techniques.