search
Log In

Recent questions tagged minimum-maximum

10 votes
2 answers
1
Given a set of $n$ distinct numbers, we would like to determine both the smallest and the largest number. Which of the following statements is TRUE? These two elements can be determined using $O\left(\log^{100}n\right)$ comparisons. $O\left(\log^{100}n\right)$ ... $2(n - 1)$ comparisons. None of the above.
asked Nov 19, 2015 in Algorithms makhdoom ghaya 1.9k views
35 votes
6 answers
2
Given a set of $n$ distinct numbers, we would like to determine the smallest three numbers in this set using comparisons. Which of the following statements is TRUE? These three elements can be determined using $O\left(\log^{2}n\right)$ ... $O(n)$ comparisons. None of the above.
asked Nov 19, 2015 in Algorithms makhdoom ghaya 3.1k views
26 votes
3 answers
3
Consider the problem of computing the minimum of a set of $n$ distinct numbers. We choose a permutation uniformly at random (i.e., each of the n! permutations of $\left \langle 1,....,n \right \rangle$ is chosen with probability $(1/n!)$ and we inspect the numbers in the order given by this permutation. ... number of times MIN is updated? $O (1)$ $H_{n}=\sum ^{n}_{i=1} 1/i$ $\sqrt{n}$ $n/2$ $n$
asked Nov 19, 2015 in Algorithms makhdoom ghaya 834 views
55 votes
13 answers
4
The minimum number of comparisons required to find the minimum and the maximum of $100$ numbers is ________
asked Sep 28, 2014 in Algorithms jothee 18.3k views
To see more, click for the full list of questions or popular tags.
...