I was working on a problem on Binary Search Tree where I had to find the minimum value of the tree. Here is the link for the problem. Please visit to get a clear idea about the problem.
https://practice.geeksforgeeks.org/problems/minimum-element-in-bst/1
Below is my code:
def minValue(node):
current=node
if current.left==None:
return current.data
else:
minValue(current.left)
Why is this not returning only minimum value but also None along with it in few cases?