Consider g₁(n)=n³ for 0≤n≤10,000 and g₁(n)=n² for n>10,000; g₂(n)=n for…

PYQ GATE 1994Modified — slightly modified from the official paper; see the solution

Consider g₁(n)=n³ for 0≤n≤10,000 and g₁(n)=n² for n>10,000; g₂(n)=n for 0≤n≤100 and g₂(n)=n³ for n>100. Which of the following is true?

  1. A.

    g₁(n) is O(g₂(n))

  2. B.

    g₁(n) is Θ(n³)

  3. C.

    g₂(n) is O(g₁(n))

  4. D.

    g₂(n) is O(n)

Attempted by 515 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…