I have created this repository to save my answers to the Codility lessons as I might want to revisit them at a later date.
If you stumbled upon this repository and want to have a look at the way I went about solving the problems, go right ahead.
If you have come up with a more elegant way or a more pythonic way to solve a specific problem, please get in touch as I am always keen to learn new things and improve.
The following is a list of the tasks from the Codility Lessons:
Exercise | Score | Complexity |
---|---|---|
Lesson 1 - BinaryGap | 100% | O(N) |
Lesson 2 - OddOccurrencesInArray | 100% | O(N * log(N)) |
Lesson 2 - CyclicRotation | 100% | O(1) |
Lesson 3 - FrogJmp | 100% | O(1) |
Lesson 3 - PermMissingElem | 100% | O(N * log(N)) |
Lesson 3 - TapeEquilibrium | 100% | O(N) |
Lesson 4 - PermCheck | 100% | O(N * log(N)) |
Lesson 4 - FrogRiverOne | 100% | O(N) |
Lesson 4 - MissingInteger | 100% | O(N * log(N)) |
Lesson 4 - MaxCounters | 100% | O(N + M) |
Lesson 5 - PassingCars | 100% | O(N*2) |
Lesson 5 - GenomicRangeQuery | 100% | O(N + M) |
Lesson 5 - MinAvgTwoSlice | 100% | O(N) |
Lesson 5 - CountDiv | 100% | O(1) |
Lesson 6 - Distinct | 100% | O(N * log(N)) |
Lesson 6 - MaxProductOfThree | 100% | O(N * log(N)) |
Lesson 6 - Triangle | 100% | O(N * log(N)) |
Lesson 6 - NumberOfDiscIntersections | 100% | O(N * log(N)) |
Lesson 7 - Brackets | 100% | O(N) |
Lesson 7 - Fish | 100% | O(N) |
Lesson 7 - Nesting | 100% | O(N) |
Lesson 7 - StoneWall | 100% | O(N) |
Lesson 8 - EquiLeader | 100% | O(N) |
Lesson 8 - Dominator | 100% | O(N) |