Log in from a computer to take this course

You'll need to log in from a computer to start Learn Recursion with Python. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

We’ll use an iterative solution to the following problem: find the minimum value in a list.

def find_min(my_list): min = None for element in my_list: if not min or (element < min): min = element return min find_min([42, 17, 2, -1, 67]) # -1 find_mind([]) # None find_min([13, 72, 19, 5, 86]) # 5

This solution has a linear runtime, or O(N), where N is the number of elements in the list.



Implement your version of find_min() which has the same functionality using recursive calls!

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?