From 14e4d3c158bbdfdd58cf0ad4c6faa04b3a4a9e5f Mon Sep 17 00:00:00 2001 From: SUSHMITA YADAV Date: Sun, 14 Oct 2018 19:50:50 +0530 Subject: [PATCH] Remove commented code --- find_min_index.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/find_min_index.py b/find_min_index.py index bcac5e8..239389f 100644 --- a/find_min_index.py +++ b/find_min_index.py @@ -9,20 +9,7 @@ def minOfList(lst, start=0, end=1): ''' 'approach: updating min_element using comparision in recursion and returning its index after traversing completely' - ''' - if i == 0: - i = start - j = start - - if i == (end+1): - return j - else: - if lst[i] < lst[j]: - min_element = lst[i] - j = i - i = i+1 - return minOfList(lst,start, end, i, j) - ''' + if end == len(lst)-1: return start elif lst[end] > lst[start]: