Brain Aero
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
thecannabidiol2456
Posts : 1
Join date : 2022-09-22

WHAT IS THE MAJOR DIFFERENCE BETWEEN LINEAR AND BINARY SEARCH? Empty WHAT IS THE MAJOR DIFFERENCE BETWEEN LINEAR AND BINARY SEARCH?

Thu Sep 22, 2022 10:03 am
Main difference between linear search and binary search are:

In linear search, data can be in any random order and not necessarily sorted. In this, single and multidimensional arrays both can be used. Time complexity of it is O(n). It is not an efficient method to be used for a large list.

In Binary search, data should be in sorted order. In this, only a single dimensional array can be used. Time complexity is O(log2 N). It is efficient for large lists and inputs as well.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum