11 11 votes A machine needs a minimum of $100$ sec to sort $1000$ names by quick sort. The minimum time needed to sort $100$ names will be approximately $50.2$ sec $6.7$ sec $72.7$ sec $11.2$ sec Algorithms isro2015 algorithms quick-sort + – ish.nit513 15.2k views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
Best answer 28 28 votes Running time of quick sort = c n lg n For n = 1000, we get 100 = c * 1000 * lg 1000 => c = 0.01 So, for n = 100, we get running time = 0.01 * 100 * lg 100 = 6.7 Arjun answered Jun 7, 2015 • selected Jun 7, 2015 by Arjun Arjun comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments shweta1920 commented Dec 16, 2017 reply Follow flag how when n=1000 c=0.01??? pls solve m not getting c=.01 0 0 replyShare princeit07 commented Jun 26, 2021 reply Follow flag ANS. (B) 4 4 replyShare Mo_Saif commented Jul 25, 2025 reply Follow flag Thank youu so much 0 0 replyShare Please log in or register to add a comment.
15 15 votes min no of comparison for quick sort = nlogn so to sort 1000 names 1000*3 ie 3000 comparisons are needed. For 3000 comparisons we need 100s , thus for 1 comparison we need 0.033s To sort 100 names we need 200 comparisons thus time needed is 0.033*200 s = 6.67 s komal07 answered May 19, 2015 komal07 comment Share Follow See all 6 Comments 6 6 Comments reply Show 3 previous comments Arjun commented Jul 2, 2016 reply Follow flag yes, you can do that.. 1 1 replyShare Devwritt commented Jul 2, 2016 reply Follow flag thnks sir 0 0 replyShare Mo_Saif commented Jul 25, 2025 reply Follow flag How we are using comparison as 3k ? 0 0 replyShare Please log in or register to add a comment.
2 2 votes TC of Quick Sort = O(nlogn) = c.nlogn (base = 2) For, n = 1000, TC = 100 sec = c (1000 x log1000) 100 sec = c (1000 x log1024) // log1000 ≈ log1024 100 sec = c (1000 x 10) c = 0.01 sec For, n = 100 TC = c (100 x log100) = 0.01 (100 x log100) sec = 0.01 (100 x log128) sec // log100 ≈ log128 = 0.01 (100 x 7) sec = 7 sec ≈ 6.7 sec So, option B is correct Karan Suthar answered Dec 3, 2025 Karan Suthar comment Share Follow 0 reply Please log in or register to add a comment.