Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Combinations(List<string> m, string output = "")
- {
- if (m.Count == 0)
- {
- Console.WriteLine(output);
- return;
- }
- for (int i = 0; i < m.Count; i++)
- {
- List<string> tmp = new List<string>(m);
- tmp.RemoveAt(i);
- Combinations(tmp, output + m[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement