Coder Social home page Coder Social logo

lgtm-migrator / algorithm-visualizer-react-app Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anandman03/algorithm-visualizer-react-app

0.0 0.0 0.0 677 KB

A react.js app for visualization of sorting algorithms.

Home Page: https://anandman03.github.io/algorithm-visualizer-react-app/

License: MIT License

JavaScript 82.98% CSS 10.29% HTML 6.73%

algorithm-visualizer-react-app's Introduction

Sorting Visualizer

CodeFactor DeepScan grade

This is a progressive web app built using React.js to visualize sorting algorithms such as bubble, insertion, selection, merge, quick, heap and twist sort. This app is deployed with GitHub pages and can be accessed here: Link. I hope you have fun playing around with it.

Installation and Setup Instructions

Installation:

$ git clone https://github.com/anandman03/algorithm-visualizer-react-app.git
$ cd algorithm-visualizer-react-app
$ npm install

To start server:

$ npm start

To Visit App in any browser:

http://localhost:3000/

Purpose

I wanted to improve my skills with React.js, JavaScript, CSS and also learn sorting algorithms.This project turned out to be a great way to achieve both of the aforementioned objectives at the same time. I also implemented a sorting algorithm of my own named Twist Sort.

Component Structure

component

Meet the Algorithms

  1. Twist sort is a efficient hybrid sorting algorithm based on insertion and merge sort. This sorting algorithm uses merge sort to divide the array and when the size of array reaches a threshold, it uses insertion sort to sort the smaller arrays. The time complexity of the algorithm is O(n log(n)).

  2. Bubble sort is a comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. The worst case complexity are of Ο(n*n) where n is the number of items.

  3. Insertion Sort is an in-place comparison-based sorting algorithm. The array is searched sequentially and unsorted items are moved and inserted into the sorted sub-list. The worst case complexity are of Ο(n*n), where n is the number of items.

  4. Selection sort is a in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. The worst case complexities are of Ο(n*n), where n is the number of items.

  5. Merge sort is a sorting technique based on divide and conquer technique. With worst-case time complexity being Ο(n log(n)), it is one of the most respected algorithms.

  6. Quick sort is based on partitioning of array of data into smaller arrays. Quicksort partitions an array and then calls itself recursively twice to sort the two resulting subarrays. The average and worst-case complexity are O(n log(n)) and Ο(n*n), respectively.

  7. Heap sort is a comparison based sorting technique based on Binary Heap data structure. It is similar to selection sort where we first find the maximum element and place the maximum element at the end. We repeat the same process for the remaining elements. With worst-case time complexity being Ο(n log(n)), it is one of the most respected algorithms.

Design

home

Lisence

MIT

Contributor

Mansimar_Anand

algorithm-visualizer-react-app's People

Contributors

anandman03 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.