Question
Easy

Time complexity of Merge Sort Algorithm and Binary Search Algorithm are respectively............

1
$O(\log_{2}n)$ and $O(n \log_{2}n)$
2
$O(n \log_{2}n)$ and $O(\log_{2}n)$
3
$O(n^2)$ and $O(\log_{2}n)$
4
$O(2^n)$ and $O(n^2)$
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Data Structures (Through C++)
Topic: Data Structure Concepts
Correct Answer
Option B
Explanation

The correct option is (2): $O(n \\log\{2}n)$ and $O(\\log\{2}n)$ Merge Sort is a highly efficient sorting algorithm that follows the Divide and Conquer paradigm. To calculate its time complexity, we consider the two main phases: the recursive division and the merging process. The division of the array into halves continues until the subarrays contain a single element, which results in $\\log\_{2}n$ levels of recursion. Crucially, the merging of the sorted…Read More

Time complexity of merge - HTET Level 3 | Clear Cutoff