A

Admin • 833K Points
Coach

Q. What will be the recurrence relation of the code of recursive selection sort?

  • (A) t(n) = 2t(n/2) + n
  • (B) t(n) = 2t(n/2) + c
  • (C) t(n) = t(n-1) + n
  • (D) t(n) = t(n-1) + c

Explanation by: Admin

function to find the minimum element index takes n time.the recursive call is made to one less element than in the previous call so the overall recurrence relation becomes t(n) = t(n-1) + n.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.