File tree Expand file tree Collapse file tree 1 file changed +30
-32
lines changed
Expand file tree Collapse file tree 1 file changed +30
-32
lines changed Original file line number Diff line number Diff line change @@ -31,22 +31,19 @@ export default class SortingVisualizer extends React.Component {
3131 }
3232
3333 bubbleSort = ( ) => {
34- console . log ( "called bubble sort" )
3534 removeButton ( ) ;
3635 const animations = getBuubleSortAnimations ( this . state . array ) ;
3736 performAnimation ( animations ) . then ( document . querySelector ( '#clear' ) . disabled = false )
3837
3938 }
4039
4140 selectionSort = ( ) => {
42- console . log ( "called selection sort" )
4341 removeButton ( ) ;
4442 const animations = getSelectionSortAnimations ( this . state . array ) ;
4543 performAnimation ( animations ) . then ( document . querySelector ( '#clear' ) . disabled = false )
4644 }
4745
4846 insertionSort = ( ) => {
49- console . log ( "called insertion sort" )
5047 removeButton ( ) ;
5148 const animations = getInsertionSortAnimations ( this . state . array ) ;
5249 performAnimation ( animations ) . then ( document . querySelector ( '#clear' ) . disabled = false )
@@ -97,35 +94,36 @@ export default class SortingVisualizer extends React.Component {
9794 < button id = "merge" className = "btn" onClick = { this . mergeSort } > Merge Sort</ button >
9895 < button id = "clear" className = "btn" onClick = { this . clear } > Clear</ button >
9996 < p >
100- < h2 className = "complexity" > Time Complexity</ h2 >
101-
102- < table className = "tableDetails" >
103- < tr >
104- < th > Algorithm</ th >
105- < th > Best Case</ th >
106- < th > Worst Case</ th >
107- </ tr >
108- < tr >
109- < td > Bubble Sort</ td >
110- < td > O(n^2)</ td >
111- < td > O(n^2)</ td >
112- </ tr >
113- < tr >
114- < td > Selection Sort</ td >
115- < td > O(n^2)</ td >
116- < td > O(n^2)</ td >
117- </ tr >
118- < tr >
119- < td > Insertion Sort</ td >
120- < td > O(n^2)</ td >
121- < td > O(n^2)</ td >
122- </ tr >
123- < tr >
124- < td > Merge Sort</ td >
125- < td > O(n log(n))</ td >
126- < td > O(n log(n))</ td >
127- </ tr >
128- </ table >
97+
98+ < h2 className = "complexity" > Time Complexity</ h2 >
99+ < table className = "tableDetails" >
100+ < tr >
101+ < th > Algorithm</ th >
102+ < th > Best Case</ th >
103+ < th > Worst Case</ th >
104+ </ tr >
105+ < tr >
106+ < td > Bubble Sort</ td >
107+ < td > O(n^2)</ td >
108+ < td > O(n^2)</ td >
109+ </ tr >
110+ < tr >
111+ < td > Selection Sort</ td >
112+ < td > O(n^2)</ td >
113+ < td > O(n^2)</ td >
114+ </ tr >
115+ < tr >
116+ < td > Insertion Sort</ td >
117+ < td > O(n^2)</ td >
118+ < td > O(n^2)</ td >
119+ </ tr >
120+ < tr >
121+ < td > Merge Sort</ td >
122+ < td > O(n log(n))</ td >
123+ < td > O(n log(n))</ td >
124+ </ tr >
125+ </ table >
126+
129127 </ p >
130128 </ div >
131129 </ div >
You can’t perform that action at this time.
0 commit comments