Giter Club home page Giter Club logo

sorting-algorithms-visualized-python's Introduction

1 - Bubble Sort:
Bubble sort is an algorithm to sort a list through repeated swaps of 
adjacent elements. It has a runtime of O(n^2).

For nearly sorted lists, bubble sort performs relatively few operations 
since it only performs a swap when elements are out of order.

Bubble sort is a good introductory algorithm which opens the door to 
learning more complex algorithms. It answers the question, “How can we 
algorithmically sort a list?” and encourages us to ask, “How can we 
improve this sorting algorithm?”

2 - Merge Sort:
Merge sort is a sorting algorithm created by John von Neumann in 1945. 
Merge sort’s “killer app” was the strategy that breaks the 
list-to-be-sorted into smaller parts, sometimes called a divide-and-conquer 
algorithm.

In a divide-and-conquer algorithm, the data is continually broken down 
into smaller elements until sorting them becomes really simple.

Merge sort was the first of many sorts that use this strategy, and is 
still in use today in many different applications.

3 - Quick Sort:
Quicksort is an efficient algorithm for sorting values in a list. A 
single element, the pivot, is chosen from the list. All the remaining 
values are partitioned into two sub-lists containing the values smaller 
than and greater than the pivot element.

Ideally, this process of dividing the array will produce sub-lists of 
nearly equal length, otherwise, the runtime of the algorithm suffers.

When the dividing step returns sub-lists that have one or less elements, 
each sub-list is sorted. The sub-lists are recombined, or swaps are made 
in the original array, to produce a sorted list of values.

4 - Radix Sort:

- A radix is the base of a number system. For the decimal number system, 
the radix is 10.
- Radix sort has two variants - MSD and LSD
- Numbers are bucketed based on the value of digits moving left to right 
(for MSD) or right to left (for LSD)
- Radix sort is considered a non-comparison sort
- The performance of radix sort is O(n)

sorting-algorithms-visualized-python's People

Contributors

ferdiakdogan avatar

Watchers

James Cloos avatar

sorting-algorithms-visualized-python's Issues

Lan gevşek

her yazdığı scripte ayrı da repo mu açarmış, ay sen büyüdün mü

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.