1 votes 1 votes An Intel core i5 RAM computer can sort 1000 entries which are initially in descending order in 1000 sec using insertion sort. The number of entries the same computer can sort in 1200 sec using selection sort is _____? Mohan Krishna 2 asked Jan 14, 2018 Mohan Krishna 2 410 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Ashwin Kulkarni commented Jan 14, 2018 reply Follow Share 1095 entries 0 votes 0 votes Mohan Krishna 2 commented Jan 14, 2018 reply Follow Share Can u please give the explanation 0 votes 0 votes Ashwin Kulkarni commented Jan 14, 2018 reply Follow Share In insertion sort entries are in descending order hence it will be the worst case hence complexity = $O(n^2)$ $c*n^2 = 1000 $ $c*(1000)^2 = 1000$ Hence $c = \frac{1}{1000}$ Now in selection sort, $c*n^2 = 1200$ $n^2 = 1000*1200$ $n = 1095$ 3 votes 3 votes Please log in or register to add a comment.
0 votes 0 votes Is the answer 1095? nandini gupta answered Jan 14, 2018 nandini gupta comment Share Follow See 1 comment See all 1 1 comment reply Mohan Krishna 2 commented Jan 14, 2018 reply Follow Share Can you please explain this 0 votes 0 votes Please log in or register to add a comment.