Sorting-A New Approach

Run-Time Sorting

There are so many ways to sort numbers like quick sort, heap sort, selection sort, merge sort, insertion sort etc but there is another way to sort numbers.This method sorts the numbers during run-time.It implies that as you enter the new number, the number is stored in the sorted order in the array.The best things about this method are..

  1. It does not require a link-list.
  2. There is no limit on the numbers of input.You can enter as many numbers as you want.

  1. Firstly create a memory block using malloc(), then input a number.
  2. Find the place where the number is to be stored in the array.
Its very simple and can easily be implemented.Its complexity analysis hasn't done yet.The following pic can help you understand the method.


Popular posts from this blog

Symbols for characters used in HTML and JAVASCRIPT

Cordova viewport problem solved

Image Search Engine Using Python