Skip to content

Instantly share code, notes, and snippets.

View LouisJenkinsCS's full-sized avatar
💭
Fellow of the Department of Energy's Computational Sciences Graduate Fellowship.

Louis Jenkins LouisJenkinsCS

💭
Fellow of the Department of Energy's Computational Sciences Graduate Fellowship.
View GitHub Profile
@LouisJenkinsCS
LouisJenkinsCS / Mergsort_In_pseudocode
Last active August 29, 2015 14:14
Attempt at making a Merge Sort in pseudocode
A[] = { 28, 39, 48, 27, 9, 88, 11, 4, 7} // Global variable, disregard bad programming practices
Function Split(int low, int hi){ // Adding brackets because not only am I used to java, it should help readability
if (hi - low) < 2 then
return array of elements from [low, hi]
mid = (hi + low) / 2
B[] = split(low, mid-1) // Either I do mid-1 or mid+1, the results seem the same
C[] = split(mid, hi) // Same problems as above
D[] = Merge(B[], C[])
return D[]