Skip to content

rabbishuki/codility

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

codility

My solutions for the codility tests


Lesson 1 - Iterations

  • 1. Binary Gap [100%]
    Find longest sequence of zeros in binary representation of an integer.

Lesson 2 - Arrays


Lesson 3 - Time Complexity

  • 1. FrogJmp [100%]
    Count minimal number of jumps from position X to Y.

  • 2. PermMissingElem [100%]
    Find the missing element in a given permutation.

  • 3. TapeEquilibrium [83%]
    Minimize the value |(A[0] + ... + A[P-1]) - (A[P] + ... + A[N-1])|.


Lesson 4 - Couting Elements

  • 1. PermCheck [100%]
    Check whether array A is a permutation.

  • 2. FrogRiverOne [100%]
    Find the earliest time when a frog can jump to the other side of a river.

  • 3. MissingInteger [100%]
    Find the smallest positive integer that does not occur in a given sequence.

  • 4. RESPECTABLE MaxCounters
    Calculate the values of counters after applying all alternating operations: increase counter by 1; set value of all counters to current maximum.


Lesson 5 - Prefix Sums

  • 1. CountDiv [100%]
    Compute number of integers divisible by k in range [a..b].

  • 2. PassingCars
    Count the number of passing cars on the road.

  • 3. RESPECTABLE GenomicRangeQuery
    Find the minimal nucleotide from a range of sequence DNA.

  • 4. RESPECTABLE MinAvgTwoSlice
    Find the minimal average of any slice containing at least two elements.


Lesson 6 - Sorting

  • 1. Triangle

  • 2. Distinct

  • 3. MaxProductOfThree

  • 4. NumberOfDiscIntersections


Lesson 7 - Stacks and Queues

  • 1. Brackets

  • 2. Fish

  • 3. StoneWall

  • 4. Nesting


Lesson 8 - Leader

  • 1. EquiLeader

  • 2. Dominator


Lesson 9 - Maximum slice problem

  • 1. MaxDoubleSliceSum

  • 2. MaxProfit

  • 3. MaxSliceSum


Lesson 10 - Prime and composite numbers

  • 1. MinPerimeterRectangle

  • 2. CountFactors

  • 3. Flags

  • 4. Peaks


Lesson 11 - Sieve of Eratosthenes

  • 1. CountSemiprimes

  • 2. CountNonDivisible


Lesson 12 - Euclidean algorithm

  • 1. ChocolatesByNumber

  • 2. CommonPrimeDivisors


Lesson 13 - Fibonacci numbers

  • 1. FibFrog

  • 2. Ladder


Lesson 14 - Binary search algorithm

  • 1. MinMaxDivision

  • 2. NailingPlanks


Lesson 15 - Caterpillar method

  • 1. AbsDistinct

  • 2. CountDistinctSlices

  • 3. CountTriangles

  • 4. MinAbsSumOfTwo


Lesson 16 - Greedy algorithms

  • 1. MaxNonoverlappingSegments

  • 2. TieRopes


Lesson 17 - Dynamic programming

  • 1. NumberSolitaire

  • 2. MinAbsSum

About

My solutions for the codility tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published