Skip to content

Instantly share code, notes, and snippets.

@pca2
Created March 22, 2016 17:11
Show Gist options
  • Save pca2/3bbb4e7c53531d6a5bc5 to your computer and use it in GitHub Desktop.
Save pca2/3bbb4e7c53531d6a5bc5 to your computer and use it in GitHub Desktop.
return smallest integer of an array
def return_min(array)
min = array[0]
for i in array
if i < min
min = i
end
end
return min
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment