9/18/2016 - 6:49 PM

Parameters for Algorithms

Parameters for Algorithms

                                  PARAMETERS FOR ALGORITHMS

(1) Time Complexity - 
    Asymptotic Analysis

(2) Space Complexity or Memory Usage - 
    (a) In Place ( Constant Memory )
    (b) Memory Usage Grows with Size of Input
(3) Stability - 

     A sorting algorithm is said to be stable if two objects with equal keys appear in the same order in sorted      output as they appear in the input unsorted array.

    (a) Some sorting algorithms are stable by nature like Insertion sort, Merge Sort, Bubble Sort, etc. 
    (b) Some sorting algorithms are unstable by nature like Heap Sort, Quick Sort, etc.
(4) Internal or External Sort - 

    (a) Internal Sort - Records stored in RAM or Main Memory
    (b) External Sort - Records stored in Auxiliary Memory (Tapes or Disks)
(5) Recursive or Non-Recursive(Iterative) - 
    (a) Recursive - Quick or Merge Sort
    (b) Non-Recursive - Insertion, Bubble & Selection Sort