Merge Sort algorithm question Please show full explanation f

Merge Sort algorithm question

Please show full explanation for good feedback

Thanks

Consider the pseudocode for Merge-Sort on page 34 of the textbook: Algorithm 2: Merge-Sort (A, p, r) 1 if p

Solution

In general, we consider that merge sort runs in O(nlogn) but in exact terms it\'s time complexity is 2nceil(logn).

But it\'s general equation is given as:

t(n) = 2t(n/2) + n

which gives O(nlogn).

Hope it helps.

Merge Sort algorithm question Please show full explanation for good feedback Thanks Consider the pseudocode for Merge-Sort on page 34 of the textbook: Algorithm

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site