📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!


    Question

    What does it mean for an algorithm to be

    "in-place"?
    A It does not use recursion. Correct Answer Incorrect Answer
    B It sorts data without using any extra memory. Correct Answer Incorrect Answer
    C It sorts data using a minimal amount of extra memory (e.g., O(1) or O(log N) auxiliary space). Correct Answer Incorrect Answer
    D It runs directly on the CPU. Correct Answer Incorrect Answer
    E It processes data from a file directly. Correct Answer Incorrect Answer

    Solution

    An in-place algorithm transforms its input using a small, constant amount of extra storage space, typically O(1) or O(log N) (for recursion stack). It modifies the input data structure directly rather than creating a new one.

    Practice Next
    ask-question