retagged by
1,032 views
1 votes
1 votes
Q.  The best case of quick sort helps Aditya to sort a particular data set of size ‘n’ in 640 ms. Suresh also tried the same algorithm on similar data set and it took him 256 ms in best case to sort a file of size 16. What could be Aditya’s file size?
retagged by

1 Answer

4 votes
4 votes
When we say best case is n log n = nklogn where k it's constant

So 16 k log 16 = 256

So k will be 4

Thus n*4logn= 640

n log n = 160

N= 32

Related questions

332
views
1 answers
3 votes
353
views
0 answers
2 votes
kallu singh asked Dec 16, 2017
353 views
274
views
1 answers
0 votes
kallu singh asked Aug 19, 2017
274 views
What is the time complexity to construct a binary tree when inorder and preorder traversal of the tree is given?1. O(n)2.O(n log n)3. O(n2)4.O(n2 log n)
437
views
0 answers
1 votes
kallu singh asked Aug 17, 2017
437 views
Q. Consider the weighted undirected graph with 4 vertices, where the weight of edge {i, j} g is given by the entry Wij in the matrix WThe largest possible integer ... : This question was asked as Numerical Answer Type.A) 8B) 12C) 10D) 11