Interview QuestionSoftware Engineer / Developers
- 0of 0 votes
Given an array, print combinations of the array elements such that it is printed only once and the order is not important between the elements. Eg. array = [a,b,c,d]
o/p should be "", a,b,c,d,ab,ac,ad,bc,bd,cd,abc,abd,acd,bcd, abcd.. so it should not repeat abc in the form cab or bca etc..
Output number wil always be 2^n and do this in O(1) space.
Country: United States
Interview Type: In-Person