Which of the following approaches are used to search operations?
-
Linear search
-
Binary search
-
Both (1) & (2)
-
None of these
C
Correct answer
Explanation
Both linear search and binary search are fundamental approaches to search operations. Linear search works on unsorted data by checking each element sequentially, while binary search requires sorted data and repeatedly divides the search interval in half, making it much faster for large datasets.