Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Updated javascript array operation
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- Download Here ►►► http://www.fl-y.com/download-here
- Download Here ►►► http://www.fl-y.com/download-here
- Download Here ►►► http://www.fl-y.com/download-here
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- int[] lewa = new int[array.Length / 2];
- int[] prawa = new int[array.Length / 2];
- if (array.Length > 1)
- {
- lewa = array.Take(array.Length / 2).ToArray();
- prawa = array.Skip(array.Length / 2).ToArray();
- Sortowanie(lewa);
- Sortowanie(prawa);
- }
- int i, j, k;
- i = j = k = 0;
- while((i<lewa.Length) && j <( prawa.Length))
- {
- if (lewa[i] < prawa[j])
- {
- array[k] = lewa[i];
- i++;
- }
- else
- {
- array[k] = prawa[j];
- j++;
- }
- k++;
- }
- while (i < lewa.Length)
- {
- array[k] = lewa[i];
- i++;
- k++;
- }
- while (j < prawa.Length)
- {
- array[k] = prawa[j];
- j++;
- k++;
- }
- return array;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement