Keeping track of my solutions to Codility's problems. All implemented in C#.
Given two integers A and B, return a string which contains A letters "a" and B letters "b" with no three consecutive letters being the same.
Reduce a string containing instances of the letters "A", "B" and "C" via the following rule: remove one occurrence of "AA", "BB" or "CC".
Alternate solution (Score 83%)
Find a symmetry point of a string, if any.
Compute the height of a binary tree.
Compute number of inversion in an array.
Given two strings representing times of entry and exit from a car parking lot, find the cost of the ticket according to the given billing rules.
Find the highest power of 2 that divides N.
Given the number of players P and the number of reserved courts C, returns the maximum number of games that can be played in parallel.
Bob wants to take as many pairs of clean socks as possible on his trip. Given clean and dirty socks, determine the maximum number of pairs he can obtain by optimally choosing which dirty socks to wash with limited washing machine capacity.
- Answers are my own and are published here as a way to keep track of them.
- Tests are copyrighted by Codility Limited.