Abstract

Time complexity describes the amount of time taken by the computer to run a code by counting the number of operations performed in an algorithm. Algorithms with optimistic logic tend to have less time complexity. Usually, the time complexity is computed theoretically or mathematically. Big O notation describes the worst-case time complexity of the algorithm using algebraic terms. This work calculate the Big O time complexity using two methods: brute force approach and machine learning approach. The Machine learning Approach determines the algorithm's time complexity more rapidly and without executing the code. Lexer is used to extract features from source code in machine learning approach. It is outlined that significant improvement can be achieved in the machine learning approach by giving importance to some known features and increasing dataset size. These two methods are benchmarked on the bubble sort algorithm. Experimental results show that the machine learning approach speeds up time complexity estimate by a factor of up to 97.51% compared to the brute force approach..

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.