Codility Lessons Solutions
Codility is a company that provides testing of candidates coding skills.
Essentially their site asks the applicant to write a function to perform a task, then runs unit tests against the answer.
They also provide a set of tasks that anyone can take and get their answer tested, called ‘lessons’. I’d recommend these to any programmer to check their own skills, especially when learning a new language.
One caveat is that the attached ‘Reading Material’ isn’t high quality, although their solutions rely on specific hacks they describe. You are better off with a good book on algorithms.
Below are links to my solutions to some of the tasks, all in C++.
Lesson
- Iterations
- Arrays
- Time Complexity
- Counting Elements
- Prefix Sums
- Sorting
- Stacks and Queues
- Leader
- Maximum slice problem
- Prime and composite numbers
- Sieve of Eratosthenes
- Euclidean algorithm
- Fibonacci numbers
- Binary search algorithm
- Caterpillar method
- Greedy algorithms
- Dynamic programming
BinaryGap Solution (100%)
CyclicRotation Solution (100%)
TapeEquilibrium Solution (100%)
MaxCounters Solution (100%)
PermCheck Solution (100%)
CountDiv Solution (100%)
GenomicRangeQuery Solution (100%)
MinAvgTwoSlice Solution (100%)
PassingCars Solution (100%)
StoneWall Solution (100%)
Equileader Solution (100%)
MaxDoubleSliceSum Solution (100%)
MaxSliceSum Solution (100%)
CountFactors Solution (100%)
Peaks Solution (100%)
count SemiPrimes Solution (100%)
CommonPrimeDivisors Solution (100%)
FibFrog Solution (100%)
Nailing Planks Solution (100%)
5 replies on “Codility Lesson Solutions in C++”
[…] ← Codility Lesson Solutions → Codility: Cyclic Rotation Solution […]
[…] Codility Lesson Solutions […]
[…] Codility Lesson Solutions […]
[…] Codility Lesson Solutions […]
[…] Codility: MaxCounters Solution – TDK on Codility Lesson Solutions […]