From 9a4381f8724159f95ef94d5a35881d657131a093 Mon Sep 17 00:00:00 2001 From: CayoViegas <50140892+CayoViegas@users.noreply.github.com> Date: Fri, 18 Oct 2019 15:55:06 -0300 Subject: [PATCH] Create FindMinimum.py --- allalgorithms/numeric/FindMinimum.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 allalgorithms/numeric/FindMinimum.py diff --git a/allalgorithms/numeric/FindMinimum.py b/allalgorithms/numeric/FindMinimum.py new file mode 100644 index 0000000..48b8fbd --- /dev/null +++ b/allalgorithms/numeric/FindMinimum.py @@ -0,0 +1,17 @@ +# -*- coding: UTF-8 -*- +# +# Find Minimum Algorithm +# The All â–²lgorithms library for python +# +# Contributed by: Cayo Viegas +# Github: @CayoViegas +# + +def find_min(L): + min = L[0] + + for x in L: + if x < min: + min = x + + return min