Codility Solutions

This is a master index of the Codility practice problems I solved in Java. All solutions were unit tested with TestNG and I have included the test code for each solution. All code has been committed to Github.

Lesson 1 – Iterations
BinaryGap

Lesson 2 – Arrays
CyclicRotation

OddOccurrencesInArray
(Odd Occurrences In Array)

Lesson 3 – Time Complexity

FrogJmp (Frog Jump)

PermMissingElem (Permuation Missing Element)

TapeEquilibrium

Lesson 4 – Counting Elements

FrogRiverOne

MissingInteger

PermCheck (Permuation Check)

MaxCounters

Lesson 5 – Prefix Sums

CountDiv

PassingCars

GenomicRangeQuery

MinAvgTwoSlice

Lesson 6 – Sorting

MaxProductOfThree

Distinct

Triangle

NumberOfDiscIntersections

Lesson 7 – Stacks and Queues
StoneWall

Brackets

Fish

Nesting

Lesson 8 – Leader

Dominator

EquiLeader

Lesson 9 – Maximum Slice

MaxProfit

MaxDoubleSliceSum

MaxSliceSum

Lesson 10 – Prime and composite numbers

CountFactors

MinPerimeterRectangle

Lesson 11 – Sieve of Eratosthenes

Primes

CountSemiprimes

Lesson 12 – Euclidean algorithm

Greatest Common Divisor

ChocolatesByNumbers

Lesson 13 – Fibonacci numbers

Fibonacci