Skip to content

senenh/codility-lessons

 
 

Repository files navigation

Codility Lessons

Build Status SensioLabsInsight StyleCI Code Climate Scrutinizer Code Quality

All the Codility lessons tried by me. I have used PHP for finding solution to the problems.

  • Total lessons: 16
  • Total Problems: 50
    • Painless: 33
    • Respectable: 14
    • Ambitious: 3
  • Completed: 30
    • Painless: 23
    • Respectable: 7
    • Ambitious: 0

To use this code:

  • Clone this repository
  • run composer update in the project root directory
  • run npm install in the project root directory (if you want to automate testing using gulp)
    • if using gulp: run gulp from the project root and whenever you edit code, all tests will run
  • All the solutions are on src/ folder.
  • If you want to test the solutions, run vendor/bin/phpspec run in the project root directory

Note: I welcome everyone to look in the code and if you can find better solution, please contribute it in the repo. I tried to implemented couple of test cases, so that the solution won't break.

  • TapeEquilibrium
  • FrogJmp
  • PermMissingElem
  • FrogRiverOne
  • PermCheck
  • MissingInteger
  • MaxCounters
  • CountDiv
  • PassingCars
  • MinAvgTwoSlice
  • GenomicRangeQuery
  • MaxProductOfThree
  • Triangle
  • Distinct
  • NumberOfDiscIntersections
  • Nesting
  • StoneWall
  • Brackets
  • Fish
  • Dominator
  • EquiLeader
  • MaxDoubleSliceSum
  • MaxProfit
  • MaxSliceSum
  • MinPerimeterRectangle
  • CountFactors
  • Peaks
  • Flags
  • CountSemiprimes
  • CountNonDivisible
  • ChocolatesByNumbers
  • CommonPrimeDivisors
  • Ladder
  • FibFrog
  • MinMaxDivision
  • NailingPlanks
  • AbsDistinct
  • CountDistinctSlices
  • CountTriangles
  • MinAbsSumOfTwo
  • MaxNonoverlappingSegments
  • TieRopes
  • NumberSolitaire
  • MinAbsSum
  • StrSymmetryPoint
  • TreeHeight
  • BinaryGap
  • OddOccurrencesInArray
  • ArrayInversionCount
  • PolygonConcavityIndex

And many more to come.

About

Codility lessons solution by PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 98.6%
  • JavaScript 1.4%