2 votes 2 votes An array ‘A’ of length n contains numbers {0, 1, 2}, numbers are present in array in arbitrary order. The best sorting algorithms, takes 250 units of time when n = 100. If n = 450. The minimum time required by algorithm on same hardware __________ (Rounded off to integers). Algorithms test-series algorithms sorting time-complexity + – Shivi rao asked Oct 9, 2017 • retagged Jun 24, 2022 by makhdoom ghaya Shivi rao 510 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes The best sort for this is counting sort, which has a time complexity of O(n). As the range is significantly less than the number of inputs. For 100 inputs => 250 seconds. Then for 450 inputs => 2.5 x 450 = 1125. Harish Kumar 2 answered Oct 9, 2017 • selected Oct 9, 2017 by Shivi rao Harish Kumar 2 comment Share Follow See all 0 reply Please log in or register to add a comment.