Mistake in Weekly Lab Work / Week 7 / Analysis / Determine Big Oh from Code / Recursion 2
bar() is recursively called as bar(n/3) but this means it receives a float as its argument, which does not match the function typing. Furthermore, this will cause the end condition n==0 to never be reached, giving infinite recursion.
In the answer model the Master Method is used, but this may only be applied if the end condition is n==1, so this is incorrect.
Furthermore, the for-loop is run with range(math.pow(n,3)), which does not work; math.pow() returns a float, and range takes an integer.