What is the running time of an insertion sort algorithm if the input is…

PYQ IBM Hiring Assessment 2024

What is the running time of an insertion sort algorithm if the input is pre-sorted?

  1. A.

    O(N^2)

  2. B.

    O(N log N)

  3. C.

    O(N)

  4. D.

    O(M log N)

Attempted by 585 students.

Sign up free to check your answer

Sign up free

Explore the full course: Cdac C Cat Complete Preparation

Loading lesson…