diff --git a/src/App.jsx b/src/App.jsx index 4635c89..a164ee5 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -76,121 +76,123 @@ function App() { return ( -
- -

- Sorting Visualizer -

- -
+ <> +
+ +

+ Sorting Visualizer +

+ +
+ + setAlgorithm(e.target.value)} - disabled={sorting} - > + - + + + + + - - - - - + - + - + - + - + - +
-
+
{/* It has Size and speed control */} -
{/* It has Size and speed control */} +
{/* For the Size Control control */} + + -
{/* For the Size Control control */} - - + setArraySize(parseInt(e.target.value))} + className="w-32" + disabled={sorting}/> - setArraySize(parseInt(e.target.value))} - className="w-32" - disabled={sorting}/> + {arraySize} - {arraySize} +
-
+
{/* For Speed Control */} + + -
{/* For Speed Control */} - - + setSpeed(parseInt(e.target.value))} + className="w-32" + disabled={sorting}/> - setSpeed(parseInt(e.target.value))} - className="w-32" - disabled={sorting}/> + {speed} +
- {speed}
-
+
-
+ {array.map((value , index) => ( +
+ {/* {value} */} +
+ ))} +
- {array.map((value , index) => ( -
- {/* {value} */} + {completed && ( +
+ Sorting Completed!
- ))} -
- - {completed && ( -
- Sorting Completed! -
- )} + )} - {algortihm == "bubbleSort" && } - {algortihm == "mergeSort" && } - {algortihm == "insertionSort" && } - {algortihm == "quickSort" && } - {algortihm == "heapSort" && } - {algortihm == "selectionSort" && } + {algortihm == "bubbleSort" && } + {algortihm == "mergeSort" && } + {algortihm == "insertionSort" && } + {algortihm == "quickSort" && } + {algortihm == "heapSort" && } + {algortihm == "selectionSort" && } +
+ ) }