Skip to content

correct solutions in java/scala for codility problems with unit test (Spock/ScalaTest)

Notifications You must be signed in to change notification settings

apulbere/codility-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

100% correct solutions for codility problems

Content

  • Iterations
    • BinaryGap - Find longest sequence of zeros in binary representation of an integer
  • Arrays
  • Time Complexity
    • PermMissingElem - Find the missing element in a given permutation
    • FrogJmp - Count minimal number of jumps from position X to Y
  • Counting Elements
    • PermCheck - Check whether array A is a permutation
    • FrogRiverOne - Find the earliest time when a frog can jump to the other side of a river
    • MissingInteger - Find the minimal positive integer not occurring in a given sequence
  • Prefix Sums
    • PassingCars - Count the number of passing cars on the road
    • GenomicRangeQuery - Find the minimal nucleotide from a range of sequence DNA
    • MinAvgTwoSlice - Find the minimal average of any slice containing at least two elements.
  • Sorting
    • Distinct - Compute number of distinct values in an array
    • Triangle - Determine whether a triangle can be built from a given set of edges
    • MaxProductOfThree - Maximize A[P] * A[Q] * A[R] for any triplet (P, Q, R)
    • NumberOfDiscIntersections - Compute the number of intersections in a sequence of discs
  • Stacks and Queues
    • Brackets - Determine whether a given string of parentheses is properly nested
    • StoneWall - Cover "Manhattan skyline" using the minimum number of rectangles
    • Fish - N voracious fish are moving along a river. Calculate how many fish are alive
  • Maximum slice problem
    • MaxProfit - Given a log of stock prices compute the maximum possible earning
    • MaxSliceSum - find the maximum sum of any slice of A
  • Prime and composite numbers

About

correct solutions in java/scala for codility problems with unit test (Spock/ScalaTest)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published