मराठी

In which of the following scenarios would you prefer to use a Linear search algorithm? -

Advertisements
Advertisements

प्रश्न

In which of the following scenarios would you prefer to use a Linear search algorithm?

पर्याय

  • When you have to search through an ordered data set.

  • When you have to search through an unordered data set.

  • When you are dealing with a small data set.

  • When you are dealing with a huge data set.

MCQ

उत्तर

When you are dealing with a small data set.

Explanation:

When the dataset is tiny, we prefer to employ the linear search algorithm. It makes no difference whether the data.set is ordered or unordered because the algorithm will search progressively. Linear search is not appropriate for large data sets. If there are 100 elements in a list and none of them have the key, the algorithm will perform n searches.

shaalaa.com
Linear Search
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×