You are given three algorithms, $A$, $B$, and $C$ with the following time complexities in the worst case $O(n)$, $\Theta(n)$, and $\Omega(\log n )$, respectively.Assume that you have to choose exactly one algorithm, what would you choose as the best algorithm? Explain your answer.I think I cannot choose $C$ because I cannot guarantee that the complexity is very large, i.e., $2^n$.I would choose $A$ and not $B$. Why? Well $A$ could have a very low complexity since its complexity is $O(n)$ so complexity of $A$ is less than $c\cdot n$. But, $B$ is always bounded from above and from below by $c\cdot n$.Is my answer correct?
Pick algorithm with runtime in O(n) vs. (n) vs. (\log n )
algorithm analysis;asymptotics;runtime analysis