recategorized by
607 views
2 votes
2 votes

There is an unsorted list of $n$ integers. You are given $3$ distinct integers and you have to check if all $3$ integers are present in the list or not. The only operation that you are allowed to perform is a comparison. Let $A$ be an algorithm for this task that performs the least number of comparisons. Let $c$ be the number of comparisons done by $A$. Then,

  1. $c=3 n$
  2. $c=2 n+5$
  3. $c \geq 3 n-1$
  4. $c \leq n$
  5. $c \leq 2 n+3 $
recategorized by

1 Answer

Answer:

Related questions

3 votes
3 votes
1 answer
1
admin asked Sep 1, 2022
546 views
Which data structure is commonly used to implement breadth first search in a graph?A queueA stackA heapA hash tableA splay tree
4 votes
4 votes
2 answers
3
1 votes
1 votes
1 answer
4
admin asked Sep 1, 2022
838 views
Consider the problem of sorting $n$ single digit integers (base $10$). This problem can be solved in time$O(n \log n)$ but not $O(n \log \log n)$$O(n \log \log n)$ but no...