posted 16 years ago
I need to iterate a hashmap and form all possible combinations for example if there are five keys say 1, 2, 3, 4 , 5
I need to form all possible distinct combinations for example (1,2) , (1,3) , (1,2,3) , (2,3,4) etc
Can someone help me with an algorithm for this?