Skip to content

Project Euler problems solutions and asymptotic analysis in Python, Haskell, Scala, C++ and R

License

Notifications You must be signed in to change notification settings

ditekunov/ProjectEuler-asymptotics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProjectEuler-asymptotics

Repository, that contains realizations of "Project Euler" problems solutions with asymptotic analysis.

Implemented in Python, Scala, Haskell, C++ and R.

Full analysis is presented in Jupiter Notebook markdowns.

Python:

Task Best-case complexity Time taken Task Best-case complexity
Problem1 O(1)             0.00007s        
Problem2 O(log n) 0.00046s
Problem3 O(nlog(log n)) 0.00980s Problem23 Ω(n^2)
Problem4 O(n^2) 0.17236s Problem24 Ω(n!)
Problem5 O(n / (f(k)) 0.00028s Problem25 O(nlog n)*
Problem6 O(1) 0.00007s
Problem7 O(nlog(log n)) 0.05955s
Problem8 O(n) 0.00213s
Problem9 O(n^2) 7.02900s
Problem10 O(nlog(log n))* 0.81902s
Problem11 O(n) 0.00214s
Problem12 O(n^3) 1.70887s
Problem13 O(n) 0.00014s
Problem14 O(n) 3.94388s

Haskell:

Task Best-case complexity
Problem1 O(1)
Problem2 O(n)
Problem3 O(nlog(log n))
Problem4 O(n^2)
Problem5
Problem6 O(1)
Problem7 O(nlog(log n))
Problem8
Problem9
Problem10 O(nlog(log n))*

Scala:

Task Best-case complexity Time taken Task Best-case complexity
Problem1 O(1)
Problem2 O(n)
Problem3 O(nlog(log n))
Problem4 O(n^2) 0.224012s
Problem5
Problem6 O(1)
Problem7
Problem8 O(n)
Problem9
Problem10

R:

Task Best-case complexity
Problem1 O(1)
Problem2 O(log n)
Problem3
Problem4
Problem5 O(n / (f(k))
Problem6 O(1)
Problem7
Problem8
Problem9
Problem10

C++:

Task Best-case complexity Time taken Task Best-case complexity Time taken
Problem1 O(1) 0.002s
Problem2 O(log n) 0.003s
Problem6 O(1) 0.026s

About

Project Euler problems solutions and asymptotic analysis in Python, Haskell, Scala, C++ and R

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published