Tag Archive: CLR

Jun
10

Selection Sort

Selection sort is a sorting algorithm, specifically an in-place comparison sort. It has O(n2) complexity, making it inefficient on large lists, and generally performs worse than the similar insertion sort. Selection sort is noted for its simplicity, and also has performance advantages over more complicated algorithms in certain situations. The following is my implementation of …

Continue reading »

Jun
10

Express the function n3/1000 – 100n2 – 100n + 3 in terms of ?-notation.

I guess the answer is ?(n^3). We always mention the highest order of the equation and we ignore the constants associated with the equation.

Jun
10

Insertion Sort

I wanted to write on Algorithms for a long time and here i got a chance to write on them; Today I am going to post on Insertion sort. Insertion sort is a simple sorting algorithm, a comparison sort in which the sorted array (or list) is built one entry at a time. It is …

Continue reading »