Discussion
If(n) = 2 ×n2 + 5 × n + 3, then big Oh notation for the function f(n) is
Answer: D
The function is O(n2), which is not offered, so the answer is None of the above.
Big O keeps the fastest-growing term and drops constants. For n ≥ 1:
\[ \begin{aligned} f(n) &= 2n^{2} + 5n + 3 \\ &\le 2n^{2} + 5n^{2} + 3n^{2} = 10n^{2} \end{aligned} \]
So f(n) = O(n2). O(n), O(log n) and O(1) all grow more slowly than n2, so none of them can bound f(n) for large n.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development