Removed unnecessary function

This commit is contained in:
TiagoRG 2023-01-30 22:03:48 +00:00
parent a4090286c8
commit 691865dc2e
Signed by untrusted user who does not match committer: TiagoRG
GPG Key ID: DFCD48E3F420DB42
1 changed files with 4 additions and 9 deletions

View File

@ -32,18 +32,13 @@ def reapeatNumTimes(n):
def positionOfFirstLargest(arr):
mx = maxArray(arr)
for index, a in enumerate(arr):
if a == mx:
return index
def maxArray(arr):
mx = arr[0]
for a in arr:
index = 0
for i, a in enumerate(arr):
if a > mx:
mx = a
return mx
index = i
return index
if __name__ == "__main__":