Mazdak Farrokhzad edited Version1.tex  over 10 years ago

Commit id: 5898a9ccc72302236b205ef6bbdf2df60a163483

deletions | additions      

       

Estimating constants:  \begin{enumerate}  \item method scope, outside all loops: $a \\$a  = assignment, outerLoopInit, return = 1 + 1 + 1 = 3$ \item outer loop: $b \\$b  = forLoopTurn + middleLoopInit = 2 + 1 = 3$ \item middle loop: $c \\$c  = forLoopTurn + thisSum + innerLoopInit + branch = 2 + 1 + 1 + 4 = 8$ \item inner loop: $d \\$d  = forLoopTurn + addThisSum = 2 + 1 = 3$ \end{enumerate}  Finally, substitute constants: