Question - What are the time complexities of linear search and binary search?
Answer -
Binary search is more effective as it takes lesser comparisons to search for an element in an array. The time complexity for linear search is O(n), while it is O(log n) for binary search.