हिंदी

What is the Difference Between the Linear Search and the Binary Search Technique?

Advertisements

प्रश्न

What is the difference between the linear search and the binary search technique?

Differentiate between the following:

Linear search and Binary search.

Write one difference between Linear Search and Binary Search. 

अंतर स्पष्ट करें
Advertisements

उत्तर

S. No. Linear Search Binary Search
1. Linear search works both for sorted and unsorted data.  Binary search works on sorted data (either in ascending order or in descending order).
2. Linear search begins at the start of an array, i.e., at 0th position.  This technique divides the array into two halves, and the desired data item is searched in each half.
shaalaa.com

Notes

Students should refer to the answer according to their questions. 

  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: Arrays (Single Dimensional and Double Dimensional) - EXERCISES [पृष्ठ २४०]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 3 Arrays (Single Dimensional and Double Dimensional)
EXERCISES | Q VI. 6. | पृष्ठ २४०
अविचल Computer Applications [English] Class 10 ICSE
अध्याय 3 Arrays (Single Dimensional and Double Dimensional)
Review Insight | Q 5. | पृष्ठ २३६
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×