def thing2(lst: List[int]) -> None: """TODO: Enter your description of the runtime complexity of this function below, after the phrase Runtime:. Use one of the descriptions: constant, linear, quadratic, or 'something else' Runtime: enter answer here* Precondition: len(lst) > 0 """ n = len(lst) if n == 1: helper(lst) else: helper(lst[0:1]) def thing3(lst: List[int]) -> None: """TODO: Enter your description of the runtime complexity of this function below, after the phrase Runtime:. Use one of the descriptions: constant, linear, quadratic, or 'something else' Runtime: something else Precondition: len(lst) > 0 """ n = len(lst) i = 0 while i < n * n: helper(lst) helper(lst) i = i + n
def thing2(lst: List[int]) -> None:
"""TODO: Enter your description of the runtime complexity of this function
below, after the phrase Runtime:. Use one of the descriptions:
constant, linear, quadratic, or 'something else'
Runtime: enter answer here*
Precondition: len(lst) > 0
"""
n = len(lst)
if n == 1:
helper(lst)
else:
helper(lst[0:1])
def thing3(lst: List[int]) -> None:
"""TODO: Enter your description of the runtime complexity of this function
below, after the phrase Runtime:. Use one of the descriptions:
constant, linear, quadratic, or 'something else'
Runtime: something else
Precondition: len(lst) > 0
"""
n = len(lst)
i = 0
while i < n * n:
helper(lst)
helper(lst)
i = i + n
Step by step
Solved in 3 steps