Skip to content

jonasraoni/codility

Repository files navigation

C# Codility Solutions


My C# solutions to the Codility tasks at https://codility.com/programmers/lessons/

Almost all of the tasks were straightforward and the available time was more than enough, but few took me more than the 120min to reach 100% ._.

These are my own implementations. As I enjoy small and concise codes, whatever doesn't fit in this rule means that I had problems. Until now, there's one code in this category :)

Lesson 1 - Iterations

BinaryGap Problem Statement Solution

Lesson 2 - Arrays

OddOccurrencesInArray Problem Statement Solution
CyclicRotation Problem Statement Solution

Lesson 3 - Time Complexity

PermMissingElem Problem Statement Solution
FrogJmp Problem Statement Solution
TapeEquilibrium Problem Statement Solution

Lesson 4 - Counting Elements

MissingInteger Problem Statement Solution
PermCheck Problem Statement Solution
FrogRiverOne Problem Statement Solution
MaxCounters Problem Statement Solution

Lesson 5 - Prefix Sums

PassingCars Problem Statement Solution
CountDiv Problem Statement Solution
MinAvgTwoSlice Problem Statement Solution
GenomicRangeQuery Problem Statement Solution

Lesson 6 - Sorting

Distinct Problem Statement Solution
MaxProductOfThree Problem Statement Solution
Triangle Problem Statement Solution
NumberOfDiscIntersections Problem Statement Solution

Lesson 7 - Stacks and Queues

Brackets Problem Statement Solution
Fish Problem Statement Solution
StoneWall Problem Statement Solution
Nesting Problem Statement Solution

Lesson 8 - Leader

EquiLeader Problem Statement Solution
Dominator Problem Statement Solution

Lesson 9 - Maximum slice problem

MaxSliceSum Problem Statement Solution
MaxProfit Problem Statement Solution
MaxDoubleSliceSum Problem Statement Solution

Lesson 10 - Prime and composite numbers

MinPerimeterRectangle Problem Statement Solution
CountFactors Problem Statement Solution

Lesson 11 - Sieve of Eratosthenes

CountSemiprimes Problem Statement Solution

Others

FindTime Problem Statement Solution
SortingGroups Problem Statement Solution