1.

What do you understand by a searching algorithm? List a few types of searching algorithms.

Answer»

Searching Algorithms are used to look for an element or get it from a data STRUCTURE (usually a list of elements). These algorithms are divided into two categories based on the type of search operation:

  • Sequential Search: This method traverses the list of elements consecutively, checking each element and reporting if the element to be SEARCHED is found. Linear Search is an example of a Sequential Search Algorithm.
  • Interval Search: These algorithms were created specifically for searching sorted data structures. Because they continually TARGET the centre of the search structure and divide the search space in HALF, these types of search algorithms are far more efficient than Sequential Search algorithms. Binary Search is an example of an Interval Search Algorithm.


Discussion

No Comment Found