3 ms·
Not me, but one of my students thought that the result of the functions were magically cached by defaults, so if you call f(10) and call it again later, the com
by gus_massa 5y ago
Not me, but one of my students thought that the result of the functions were magically cached by defaults, so if you call f(10) and call it again later, the computer remembers the value and it does not affect the run time. It change the complexity of the algorithm if f(10) is inside a loop and 10 is actually a variable.