Abstract
C++, a compiled language, and Python, an interpreted language, are among those essential coding languages that function in diverse areas of the current computer industry. However, different languages have disparate benefits and fit in various circumstances. When large amounts of data are involved or fast execution speed is required, one should consider which language performs better. This research mainly aims to find out whether C++ or Python is more efficient through Topological Sorting, which is utilized to linearize the vertices of a Directed Acyclic Graph (DAG). In the approach of coding the Topological Sorting algorithm in C++ and Python and comparing their execution times on each matrix representing a DAG randomly generated by a Python program, it is concluded that C++ generally has a higher efficiency than Python.
Published Version (Free)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have