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
Task1 O(1)
Task2 O(n)
Task3 O(nlog(log n))
Task4 O(n^2)
Task5
Task6 O(1)
Task7 O(nlog(log n))
Task8
Task9
Task10 O(nlog(log n))*

Scala:

Task Best-case complexity
Task1 O(1)
Task2 O(n)
Task3 O(nlog(log n))
Task4
Task5
Task6 O(1)
Task7
Task8 O(n)
Task9
Task10

R:

Task Best-case complexity
Task1 O(1)
Task2 O(log n)
Task3
Task4
Task5 O(n / (f(k))
Task6 O(1)
Task7
Task8
Task9
Task10

C++:

Task Best-case complexity Time taken Task Best-case complexity Time taken
Task1 O(1) 0.002s
Task2 O(log n) 0.003s

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