Give the time complexity of merge sort, insertion sort in the worst case, and accessing an element of an array by its index.
Complexity and Big O Notation
Original Khojo Papers practice question — not from a past board paper.
Big O describes how the running time grows as the input grows large, and for large n the highest-order term dominates completely while constants only scale the curve without changing its shape. So 3n2 + 5n + 7 is written O(n2).
No citable source has been recorded for this record. Treat it as practice material, not as fact.
Constants can matter in practice for small inputs, which is why an O(n2) sort can beat an O(n log n) one on tiny arrays.
From the same topic and chapter, at a similar level.
Give the time complexity of merge sort, insertion sort in the worst case, and accessing an element of an array by its index.
Complexity and Big O Notation
State the time complexity of the following and justify it: for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) sum++;
Complexity and Big O Notation
What does big O notation measure, and give the complexity of linear search, binary search and bubble sort.
Complexity and Big O Notation
Write a recursive Java method to compute the factorial of a non-negative integer n.
Recursion
State and verify the absorption law X + X·Y = X using a truth table.
Boolean Algebra
Convert the Boolean expression F(A, B, C) = Σ(1, 3, 5) into its canonical sum of products form.
Boolean Algebra