• edited by
19 views
1 1 vote

What is the worst-case time complexity of a linear search algorithm in an unsorted array of $n$ elements?

  1. $\mathrm{O}(1)$
  2. $\mathrm{O}(n)$
  3. $\mathrm{O}(\log n)$
  4. $\mathrm{O}(n \log n)$

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
0 0 answers
23
23 views
Shubham Sharma 2 asked Sep 15
23 views
What is the initial value of top in an empty stack implemented using an array?$0$$-1$$1$Depends on stack size
0 0 votes
0 0 answers
16
16 views
Shubham Sharma 2 asked Sep 15
16 views
A banking transaction commits successfully, but a system crash occurs immediately afterward. Which mechanism ensures durability?LockingPartial commitTransaction isolation...
0 0 votes
0 0 answers
18
18 views
Shubham Sharma 2 asked Sep 15
18 views
Consider a finite state transducer (FST) with $Q=\left\{q_{0}, q_{1}\right\}, \Sigma=\{0,1\}, \Gamma=\{a, b$, $\mathrm{c}\}$, initial state $\mathrm{q}_{0}$, and the foll...
1 1 vote
0 0 answers
18
18 views
Shubham Sharma 2 asked Sep 15
18 views
In a memory system with fixed-sized partitions, each holding one process (as in IBM OS$/360$ MFT).Which statement is correct?Multiprogramming limited; internal fragmentat...