PadhaikoAll subjects

Past exam question: 2066 Bhadra (Regular / Back), Q6(a)

Data Structure and Algorithms · 1 marks

Open in the Padhaiko app

Topic: Introduction

Question

How can you compare either two sorting or two searching algorithms?

Solution

Criteria for Comparing Sorting or Searching Algorithms:

  1. Time Complexity: Compare best, average, and worst-case growth rates (, , ) as (e.g., Merge Sort vs. Bubble Sort; Binary Search vs. Sequential Search).
  2. Space Complexity: Auxiliary memory required (e.g., in-place vs. ).
  3. Structural Properties: Stability and adaptivity (for sorting), or sortedness requirement (for searching).
Answer:

Sorting or searching algorithms are compared by asymptotic time complexity (best/average/worst cases), auxiliary space complexity, and behavioral properties (such as stability/adaptivity or sorted-input preconditions).

All past exam questions for Data Structure and Algorithms