Differentiate Between Searching and Sorting.
Advertisements
Question
Differentiate between searching and sorting.
Distinguish Between
Advertisements
Solution
| S. No. | Sorting | Searching |
| 1. | Sorting is the rearrangement of elements in an array in a specific order. | Searching is the process of looking for a specific element in an array of elements. |
| 2. | After sorting, the sorted elements will be in a different order than they were originally. | The array's elements will remain in the same order following the search operation. |
| 3. | Sorting produces a sorted list of components. | The search results inform the user whether or not the item is in the array. |
shaalaa.com
Is there an error in this question or solution?
