A Comparative Study of Contemporary Programming Languages in Implementation of Classical Algorithms

Volume 14 Issue 1 May 2021

Download

Author(s): Muhammad Shoaib, Muhammad Shumail Naveed, Anwar Ali Sanjrani, Atiq Ahmed
Abstract Computer algorithm is the nucleus of computer science and vital prerequisite of computer science professionals. However, it is hard to comprehend. Issues in learning of algorithms are typically addressed through expounding the algorithms with their implementation in a programming language. As there are numerous programming languages, the choice of apposite programming language for plausible implementation of algorithms remains a challenging issue. In this article, standard computer algorithms of data structures are measured by analyzing their implementation in C, C++, Java and Python. During the study, 200 standard algorithms are chosen and their implementation in selected languages is analyzed. In total, 800 programs are examined with Halstead’s complexity metrics and further analyzed with the Kolmogorov-Smirnov test, Shapiro-Wilk test and KruskalWallis Test. The results of the study suggest that the implementation of basic-level algorithms in Python is less difficult and requires the smallest number of mental comparisons as compared to C++, Java and C. Its programs require minimal time to write and mental endeavors to understand and also have the minimal number of bugs. Following Python, is C++ less difficult; however, its program implementations need more time to write and understand as well as have a greater number of bugs than that in C. It is less difficult to implement the algorithms in Java as compare to that in C, but requires the most prominent number of mental efforts and time. More bugs are encountered in the implementation of Java programs as compare to the other modern languages. The study signifies that Python could be a basic language among the other languages within the study.
Keywords Programming languages; Halstead complexity; Data structures; Algorithms
Year 2021
Volume 14
Issue 1
Type Research paper, manuscript, article
Journal Name Journal of Information & Communication Technology (JICT)
Publisher Name ILMA University
Jel Classification -
DOI -
ISSN no (E, Electronic) 2075-7239
ISSN no (P, Print) 2415-0169
Country Pakistan
City Karachi
Institution Type University
Journal Type Open Access
Manuscript Processing Blind Peer Reviewed
Format PDF
Paper Link http://jict.ilmauniversity.edu.pk/arc/Vol14/14.1/4.pdf
Page 23-31