Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void permutation(int[] all, int[] current, int index)
- {
- if (index >= all.Length)
- {
- MessageBox.Show("Permutation gefunden:" + current.ToString());
- }
- else
- {
- for (int i = 0; i < all.Count(); i++)
- {
- if (!current.Contains(all[i]))
- {
- current[index] = all[i];
- permutation(all, current, index + 1);
- }
- }
- }
- }
- protected void permutation(int[] all)
- {
- int[] current = new int[all.Length];
- permutation(all, current, 0);
- }
Add Comment
Please, Sign In to add comment