Last active
September 30, 2015 23:13
-
-
Save gnarayan81/5efd4d4cce68922b9d46 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thing> | |
void swap(Type<> i, Type<> j) { | |
t = i; | |
i = j; | |
j = t; | |
} | |
RetType<> merge_sort(Array_of_Type<> a, size_of_a) { | |
if (size_of_a > 1) { | |
merge_sort(a/2, size/2); | |
merge_sort(a+size/2, size/2); | |
merge_now(); | |
} else { | |
swap(a, a/2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment