Adobe Interview Question for Technical Support Engineers
- 1of 1 vote
Generate n numbers in ascending order which are having given k factors.- rahulkumar5july July 06, 2015 in United States
then it generate number like this.
My approach is that make a min heap with given k factors.In every iteration extract one element from heap to output and put next multiplication of outputed number to min heap.
For duplicate numbers we can take an array or hashmap for denoted that number is taken or not.
My question is,How can we handle duplication without extra space.
Or any other good approach for this question ?
| Report Duplicate | Flag | PURGE
Adobe Technical Support Engineer