Coder Social home page Coder Social logo

sorting-algorithms-visualizer-java's Introduction

sorting-algorithms-visualizer-java

This is a simple java .classpath project that visualizes sorting algorithms using Java AWT and Java Swing libraries. Each algorithm that is shown right below is portrated as a diagram that can run the algorithm on a random array and compare the algorithms efficiency and time consumed. Results are saved to a MySql database and provided visualy through a GUI statistics section for better comparison.

This application was made to help developers understand better sorting algorithms and their functionalities through a visualizer that lets the developers also see the time-space complexity and compare the algorithms. It helps developers decide when to use which algorith comparing their time space complexity.

Algorithms used:

🔶 Quick Sort 🔶 Bubble Sort 🔶 Heap Sort 🔶 Merge Sort 🔶 Insertion Sort 🔶 Selection Sort 🔶 Shell Sort

GUI : Java AWT

GUI Demo:

image

The user starts the program either through the .jar file or through the Eclipse IDE. Now the user interface opens, which shows the following:

💠On the left side, there are four checkboxes, which are checked by default.

💠Below each checkbox, there is a dropdown menu that allows the user to select the algorithm to be displayed.

💠Below that, there is a slider that determines the speed at which the algorithms run.

💠The user can choose the size of the array to be sorted through an input field.

💠At the bottom, there are the buttons "Start", "Stop", and "New".

💠On the right side, there are four fields, each displaying a visualization of an algorithm. The array to be sorted is represented by vertical bars, which correspond to the values in the array.

💠Each field displays the name of the selected algorithm, the size of the array, the runtime, and the adjusted runtime (the actual runtime of the algorithm without interruptions for visualization).

💠The user has the option to activate or deactivate the fields using the checkboxes.

💠The dropdown menus allow the user to select the sorting algorithms to be displayed.

💠When the user clicks the "Start" button, the algorithms start sorting.

💠Clicking the "Stop" button interrupts the algorithm. If the "Start" button is clicked again, the algorithm resumes from where it was interrupted.

💠The user can fill a sorted array with new random values by clicking the "New" button.

UML Diagram:

image

sorting-algorithms-visualizer-java's People

Contributors

shelearningcode avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.