Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for (i = 0; i < N; i++) for (j = 0; j < N; j++) { .... some O(1) code ... }

1. for i := 1 to n do
2.   x := x + 1          // count this line
3. for j := 1 to n do
4.   for k := 1 to j do
5.     y := y + 1        // count this line too
Source by condor.depaul.edu #
 
PREVIOUS NEXT
Tagged: #code
ADD COMMENT
Topic
Name
4+7 =