Guest User

Untitled

a guest
Apr 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. protected void permutation(int[] all, int[] current, int index)
  2.         {
  3.             if (index >= all.Length)
  4.             {
  5.                 MessageBox.Show("Permutation gefunden:" + current.ToString());
  6.             }
  7.             else
  8.             {
  9.                 for (int i = 0; i < all.Count(); i++)
  10.                 {
  11.                     current[index] = all[i];
  12.                     permutation(all, current, index + 1);
  13.                 }
  14.             }
  15.         }
  16.  
  17.         protected void permutation(int[] all)
  18.         {
  19.             int[] current = new int[all.Length];
  20.             permutation(all, current, 0);
  21.         }
Add Comment
Please, Sign In to add comment