IDEAS home Printed from https://ideas.repec.org/a/rau/journl/v9y2015i1p147-156.html
   My bibliography  Save this article

Run-Time Analysis For Sorting Algorithms

Author

Listed:
  • Daniela Alexandra CRIȘAN

    (Romanian-American University)

  • Gabriel Florian SIMION

    (Romanian-American University)

  • Patrick Eugen MORARU

    (Romanian-American University)

Abstract

Analysis of algorithms complexity is an issue that has always aroused great interest. This is because an algorithm, however 'smart' it may seem, it could require a huge execution time. There are analytic techniques of evaluating the complexity of an algorithm, although they usually are difficult to use. Most often, a more convenient solution is to estimate the run-time of the algorithm.In this paper, a run-time comparative analysis is presented. It consists in evaluating the run-times of three well-known sorting algorithms: QuickSort, BubbleSort and InsertSort. A thousand different arrays of different sizes were randomly generated for the tests. Two analyses have been done: the first computes the mean run-time using all 1000 arrays with different sizes, the second uses for 1000 times a single 1000 items array. The three algorithms were implemented in three most common programming languages: Java, C++ and C#. The empirical results show that the fastest sorting algorithm is Quicksort, followed by Insertsort, then by Bubblesort. This observation conforms to the theoretical time complexity. A comparison between the three programming languages shows that the implementation in Java obtained the shortest run-time, followed by the C++ and C# versions. The order was the same for all three sorting algorithm.

Suggested Citation

  • Daniela Alexandra CRIȘAN & Gabriel Florian SIMION & Patrick Eugen MORARU, 2015. "Run-Time Analysis For Sorting Algorithms," Romanian Economic Business Review, Romanian-American University, vol. 9(1), pages 147-156, May.
  • Handle: RePEc:rau:journl:v:9:y:2015:i:1:p:147-156
    as

    Download full text from publisher

    File URL: http://www.rebe.rau.ro/RePEc/rau/jisomg/SU15/JISOM-SU15-A14.pdf
    Download Restriction: no
    ---><---

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:rau:journl:v:9:y:2015:i:1:p:147-156. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Alex Tabusca (email available below). General contact details of provider: https://edirc.repec.org/data/firauro.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.