Open samuelsoder opened 2 years ago
If = 9 || = 0 && = 1 While = 2 For = 0 Return = 0
M = 12 - 0 + 2 = 14
I've counted all if
, else if
, and else
, as well as &&
and while
, in total 17. For exit points I considered all the possible places where the function would stop running (no returns because it is void
). These points are line 137 (if the if statement evaluates to false), line 174, line 177, and line 179, in total 4.
This gives 17 - 4 + 2 = 15.
I also tried not counting else
which gives a result of 10. Neither agrees with lizard's calculation.
The implementation of Binary Search Tree (iterative) remove method in
src/main/java/com/thealgorithms/datastructures/trees/BSTIterative.java
has reported cyclomatic complexity 13 by lizard.Part 1 steps:
Part 2 steps:
issue<No>/manual-instrument
)issue<No>/increase-coverage
). Assignment PDF gives more detailed steps on what steps should be taken to identify types of tests to add etc.