1.

Heap’s algorithm requires an auxiliary array to create permutations.(a) true(b) falseThe question was asked during an internship interview.This question is from Number Theory in chapter Number Theory of Data Structures & Algorithms II

Answer»

Correct OPTION is (b) false

Easy explanation - HEAP’s algorithm does not require any extra ARRAY for generating PERMUTATIONS. Thus it is ABLE to keep its space requirement to a very low level. This makes it preferable algorithm for generating permutations.



Discussion

No Comment Found

Related InterviewSolutions