Before runnig the files on your system, ensure you have python3
installed
You can install python on various platforms by following the various tutorisls at: Install python
The project makes use of python unittest framework .A testcase is created by subclassing unittest.TestCase
.The three individual tests are defined with methods whose names start with the letters test.
Inorder to run the unit tests , move the files into the tests directory and if on *nix run
$ python -u test_filename.py
You shoud have python3 installed and unnitest
N/B For files that require unit testing,follow Running Unit tests to perform specific tests for each file
The time complexity of the steps in primeSieve() For each prime number primes <= sqrt(n) We cross out at most n/primes so we get the operations n/2+n/3+n/5+...
The sum of the reciprocals of the primes <= n equals asymptotically :
O(log log n)
A list of exercises apportioned for the second day of the bootcamp(offsite) Day 2 proposed solutions files
The main highlight of work in day_3 is creating a simple commandline application that consumes a public API using HTTP client library Day 3 proposed solutions files
The folder also contains A simple application to determine position of International Space station
Each comparison in binary search eliminates about half of the remaining items from consideration.
Comparisons | ** Items Left** |
---|---|
1 | n/2 |
2 | n/4 |
3 | n/8 |
... | ... |
i | n/2**i |
When the list is split enough times, we end up with a list that has just one item. Either that is the item we are looking for or it is not. The maximum
number of comparisons is logarithmic with respect to the number of items in the list. Therefore, the binary search is 𝑂(log 𝑛)
An imposter google page created using html and css
- Sieve of eratosthenes photo courtesy of wwwhomes
- The Andela logo , courtsey of This is Andela