We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e437d72 commit dad39c3Copy full SHA for dad39c3
algorithm/sorting/cycle/basic/code.js
@@ -4,10 +4,10 @@ var writes = 0;
4
var pos;
5
var item;
6
var temp;
7
-for( cycleStart=0; cycleStart<=N-2; cycleStart++ ){
+for( var cycleStart=0; cycleStart<=N-2; cycleStart++ ){
8
item = D[cycleStart];
9
pos = cycleStart;
10
- for( i=cycleStart+1; i<=N-1; i++ ){
+ for( var i=cycleStart+1; i<=N-1; i++ ){
11
if( D[i]<item ){
12
pos++;
13
}
@@ -54,4 +54,4 @@ for( cycleStart=0; cycleStart<=N-2; cycleStart++ ){
54
writes++;
55
56
57
-logger._print( 'Number of writes performed is ' + writes );
+logger._print( 'Number of writes performed is ' + writes );
0 commit comments