Skip to content

Compares counting inversions in an array via the Exhaustive Approach and via Divide and Conquer (Python)

License

Notifications You must be signed in to change notification settings

ndsvw/Count-Inversions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Count-Inversions

The code was executed on a MacBook Pro (Early 2015) - 2,7 GHz Intel Core i5 processor.

time python3 exhaustive.py 100
time python3 divide_and_conquer.py 100
# random array entries exhaustive divide and conquer
100 0m 0.040s 0m 0.043s
1,000 0m 0.105s  0m 0.046s
10,000 0m 5.924s  0m 0.126s
100,000 10m 3.636s 0m 0.917s
1,000,000 > 1h 0m 10.375s
10,000,000 - 2m 2.791s
100,000,000 - 25m 11.034s
1,000,000,000 - > 1h

About

Compares counting inversions in an array via the Exhaustive Approach and via Divide and Conquer (Python)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages