Professional Documents
Culture Documents
A Sort Implementation Comparing With Bubble Sort and Selection Sort
A Sort Implementation Comparing With Bubble Sort and Selection Sort
Authorized licensed use limited to: Ingrid Nurtanio. Downloaded on October 01,2020 at 02:17:29 UTC from IEEE Xplore. Restrictions apply.
Sort Implemantation is sequential programming strategy. better than it.Horizontal axis indicates number of indexes
every elements of array insert by conditions into an extra and vertical indicates the time in millisecond.The time
array like Table1. The inizial conditions and call for array are: execution of this method is higher than two other untile 520 ,
after that the time execution is lower than Bubble sort and
int[ ] d = new int [n]; from 2000 the time execution of It, Selection sort is better.
for (int i = 0; i < n; i++) The results are brought in Table2 and Figure1.
d[i] = −1; Experimental results are:
H = 0; TABLE II Results
c = Sort(a, c,d, n);
Kind 10 510 1010 1510 2010 2510
S 0 15.48 65.1 148.13 263.13 416.63
IV. TIME COMPLEXITY,CALCULATION B 0 23.65 88.63 200.63 356.65 549.50
The order of this algorithm has O(n2) .That is computed I 10.33 17.98 67.65 143.15 265.63 441.96
as:
g(n)= 2n2+3n+2
That is function of complexity:
For c=3 and n>0 the order is equal:
O (3n2).
As test illustrates the performance of this algorithm is
better than Bubble sort for great arrays.
V. TIME COMPLEXITY,EXECUTION
The result are brought in Figure1. The lines from top to
down are for Bubble sort , and Improved sort and Selection
sort orderly. The exam indicated that the Bubble sort was in
worst state and the improved sort-our implementation- was
Figure 1 Experimantes
Authorized licensed use limited to: Ingrid Nurtanio. Downloaded on October 01,2020 at 02:17:29 UTC from IEEE Xplore. Restrictions apply.