edited by
787 views
6 votes
6 votes

A sorting technique is called to sort a list of $100$ integers that have been read from a file. If all $100$ values are zero, what would be the execution requirement(in terms of Big -O) if the sort used was selection sort ?

  1. $O(N)$
  2. $O(\log N)$
  3. $O(N^2)$
  4. $O(1)$
edited by

2 Answers

Best answer
1 votes
1 votes
as here only 100 elements are present which is constant ,  time taken is constant O(1) , answer don't depnds upon selection sort .
selected by
Answer:

Related questions

0 votes
0 votes
1 answer
2
Bikram asked Nov 26, 2016
1,671 views
Three algorithms do the same task. Algorithm One is $O(N)$ and Algorithm Two is $O(\log N)$ and Algorithm Three is $O(N1/2)$. Which algorithm should execute the fastest f...
1 votes
1 votes
3 answers
3
0 votes
0 votes
0 answers
4