File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ class MainCanvas extends Component {
4343 this . selectionSort . setOptions = this . state . options ;
4444 await this . Strategy . perform ( options ) ;
4545 } } > Selection Sort</ button >
46-
4746 </ div >
4847 { /* <Options className="col-span-2" options={this}/> */ }
4948 </ div >
Original file line number Diff line number Diff line change @@ -52,14 +52,14 @@ export default class SelectionSort {
5252 if ( currentNum < currentMinBar ) {
5353 if ( minBarIndex !== i ) {
5454
55- // Provide skyblue color to the (min-idx)th bar
55+
5656 unSortedBars [ minBarIndex ] . style . backgroundColor = PROCESSING ;
5757 }
5858 minBarIndex = j ;
5959 unSortedBars [ j ] . style . backgroundColor = CURRENT_MIN ;
6060 } else {
6161
62- // Provide skyblue color to the jth bar
62+
6363 unSortedBars [ j ] . style . backgroundColor = PROCESSING ;
6464 }
6565 }
@@ -70,17 +70,10 @@ export default class SelectionSort {
7070
7171
7272
73-
74- // // Provide skyblue color to the (min-idx)th bar
75- // array[minBarIndex].style.backgroundColor = DEFAULT;
76-
77- // Provide lightgreen color to the ith bar
73+
7874 unSortedBars [ i ] . style . backgroundColor = SORTAED ;
7975
80- // if(min !== i) { // SG 07/08/2022 12:09
81- // [array[i], array[min]] = [array[min], array[i]];
82- // this.Animation.swap(i, min, array);
83- // }
76+
8477 }
8578 console . log ( unSortedBars ) ;
8679
You can’t perform that action at this time.
0 commit comments