Skip to content

kuldeeprishi/Sorting_Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Algorithms:
=====================

Bubble Sort  :   A simple sorting algorithm that works by repeatedly stepping
===========      through the list to be sorted, comparing each pair of adjacent
                 items and swapping them if they are in the wrong order. The pass
                 through the list is repeated until no swaps are needed, which
                 indicates that the list is sorted.


Insertion Sort : Insertion sort is a simple sorting algorithm that builds the
==============   final sorted array (or list) one item at a time. Insertion sort
                 iterates, consuming one input element each repetition, & growing
                 a sorted output list. On a repetition, insertion sort removes one
                 element from the input data, finds the location it belongs within
                 the sorted list, and inserts it there. It repeats until no input
                 elements remain.


Selection Sort : The algorithm divides the input list into two parts: the sublist
==============   of items already sorted, which is built up from left to right at
                 the front (left) of the list, and the sublist of items remaining
                 to be sorted that occupy the rest of the list. Initially, the
                 sorted sublist is empty and the unsorted sublist is the entire
                 input list. The algorithm proceeds by finding the smallest
                 (or largest, depending on sorting order) element in the unsorted
                 sublist, exchanging it with the leftmost unsorted element
                 (putting it in sorted order), and moving the sublist boundaries
                 one element to the right.


Merge Sort    :  Divide the unsorted list into n sublists, each containing 1
==========       element (a list of 1 element is considered sorted).
                 Repeatedly merge sublists to produce new sublists until there
                 is only 1 sublist remaining. This will be the sorted list.

About

Various Sorting Algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages