Next privilege 200 Rep.
See reduced ads
Next badge 0/1
~1k people reached
- 4 posts edited
- 0 helpful flags
- 51 votes cast
Why are nested loops considered bad practice?
Your statement that recursion can reduce an O(n^2) operation to an O(n log n) is largely inaccurate. The same algorithm implemented recursively vs iteratively should have the exact same big-O time complexity. Furthermore, recursion can often be slower (depending on language implementation), since each recursive call requires the creation of a new stack frame, while iteration only requires a branch/compare. Function calls are typically cheap, but they aren't free.
Are there any formalized/mathematical theories of software testing?
Great, thanks! I'll take a look.