Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public static void Combinations(List<string> m, string output = "")
  2. {
  3. if (m.Count == 0)
  4. {
  5. Console.WriteLine(output);
  6. return;
  7. }
  8. for (int i = 0; i < m.Count; i++)
  9. {
  10. List<string> tmp = new List<string>(m);
  11. tmp.RemoveAt(i);
  12. Combinations(tmp, output + m[i]);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement