Bookmark Topic Watch Topic
  • New Topic

iterating the hash map to form combinations  RSS feed

 
Shruthi Babu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Report post to moderator
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?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't double post.
[ May 22, 2007: Message edited by: Fred Rosenberger ]
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!