I wrote a code for constructing an expression tree and traversing the tree in three different ways
a) Inorder traversal
b) Postorder Traversal
c) Level order Traversal
So, I wanted to know the complexity of my code and found this website which calculates it:
[ http://www.lizard.ws/ ]
These were the results:
Function Name NLOC Complexity Token # Parameter #
faw 10 6 51
push 12 2 61
pushp 12 2 61
pop 5 1 25
popp 5 1 25
inorder 9 2 38
postorder 9 2 38
printLevelOrder 7 2 40
printLevel 12 4 66
height 15 3 76
main 100 21 738
Question: What does NLOC and the numbers for complexity denote? Does having a high number mean, the code isn't well optimized?
NLOC Denotes number of lines of code.For example here against push function the value is 12,NLOC tell us the size of function.Complexity column denotes the complexity of each function code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With