So here is my solution. Albeit, a little different than the suggested solution, but I believe I am adhering to the requirement to use recursion and not iteration. Where am I going wrong. Btw, the code works for all the test cases given.

def find_min(lst):
n = len(lst)
if n == 0:
return None
if n == 1:
return lst[0]
else:
if lst[0] < lst[-1]:
return find_min(lst[:-1])
else:
return find_min(lst[1:])

This is my solution. The two base cases are

if the list is empty or

if the list has only one element (which is the minimum no matter what)

The recursive calls then compare the first element of the list with the last element. And if the first element is smaller then the last we don’t need to look at this last element ever again - so we just need to look at the list without the last element lst[:-1]. For that smaller list we check again. Analogous if the last element is smaller then the first element.

After numerous recursive calls we end up with a list with just one element - that’s our min.

At the beginning min = None so “if not None” should be false. And list[0] should always be more than None since in Python 3 any integer or float is > than None.

So this condition should never be met. Or do I miss something?

Ok, I figure out why my code was wrong, in adition of the wrong placment of the recursive return, I also didin’t return the right variable. Thanks for your support.

Like the poster above, I solved with two bases cases:

If the list is len = 1, or;

If the list has two elements return the lesser of the two.

However, my approach incorporated a binary tree

Thought I believe I’ve met the requirement, I’m worried that I have massively over-complicated my approach. Are there any benefits to the way that I have solved this problem? Or did I end up making a rod for my own back?