1.

To rotate an array by using the algorithm of rotating its elements one by one is an in place algorithm.(a) true(b) falseThis question is from Arrays Types topic in section Arrays Types of Data Structures & Algorithms II got this question in a job interview.

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions