+1 vote
in Data Structures & Algorithms I by (110k points)
To rotate an array by using the algorithm of rotating its elements one by one is an in place algorithm.

(a) true

(b) false

This question is from Arrays Types topic in section Arrays Types of Data Structures & Algorithms I

I got this question in a job interview.

1 Answer

+1 vote
by (408k points)
The correct answer is (a) true

The best I can explain: The auxiliary space requirement of the mentioned algorithm is O(1). So it qualifies to be an in place algorithm.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.