Various :star2: solutions :star: for Codingame puzzles.


If you are new check out How to contribute to a project on Github.

Got an elegant solution? Other programming language? Found a bug?

Post an issue or send an email:, I'll add it up!


  • 1Γ—1Γ—1 Rubik’s cube movements [Conditions] url
  • Balanced ternary computer: encode [Math] url
  • Bank Robbers [Math] url
  • Brackets, extreme edition [Conditions] url
  • Bulk Email Generator [Regex] url
  • Counting Squares on Pegs [Loops] url
  • Disordered First Contact [String-Manipulation] url
  • Ghost Legs [Functional-Programming] url
  • Gravity Tumbler [String-Manipulation] url
  • Hidden Word [2D-Array, Functional-Programming] url
  • Horse-racing Hyperduals [Math, Functional-Programming] url
  • How time flies [Date] url
  • ISBN Check digit [Regex] url
  • Jack Silver: The Casino [Conditions] url
  • May the Triforce be with you! [Loops] url
  • Morellet’s random lines [Math, Functional-Programming] url
  • Nature of quadrilaterals [Math] url
  • orDer oF succeSsion [Loops] url
  • Organic Compounds [Nested Loops, Conditions] url
  • Rugby Score [Nested Loops] url
  • Self driving car testing.js [Loops] url
  • Simple-Awale [For-Loop] url
  • The River I [Conditions] url
  • The River II [For-Loop] url
  • The Travelling Salesman Problem [Math] url
  • What's so complex about Mandelbrot? [Math] url
  • XML MDF-2016 [Functional-Programming] url
  • Onboarding [Condition] url
  • Defibrillators [Math] url
  • Expand the polynomial [Functional-Programming, Regex, String Manipulation] url
  • Pirate's treasure [2D-Array] url
  • Add'em Up [List] url
  • Encryption/Decryption of Enigma Machine [Functional-Programming] url
  • Guessing n Cheating [Conditions] url
  • Rooks Movements [Conditions, For-Loops] url
  • Carmichael Numbers [Math] url
  • Carmichael Numbers Pre [Pre-Computation] url
  • Darts [Math, Map, Sort-Map-By-Value] url
  • Dead men's shot [Point inside Polygon] url
  • Rectangular block spinner [String Manipulation] url
  • Credit Card Verifier [Reduce] url
  • Hunger Games [String Manipulation] url
  • The Dart 101 [Conditions, Reduce] url
  • Brick in the Wall [Greedy Algorithms, Mathematics] url
  • Blowing Fuse [Conditions] url


  • ANEO Sponsored Puzzle [Math] url
  • Dwarfs standing on the shoulders of giants [Graphs, Memoization, Recursion] url
  • Scrabble [Dictionary] url
  • Telephone Numbers [Sets, Tries] url
  • The Gift [Greedy Algorithms] url
  • Network Cabling (Scala) [Loops, Distances, Medians] url
  • Network Cabling (Java) [Loops, Distances, Medians] url
  • Othello [String Manipulation] url
  • Skynet Revolution - Ep1 [Graphs, BFS] url
  • Teads Sponsored Contest [Graphs, BFS] url
  • Micro Assembly [String Evaluation] url
  • The Optimal Urinal Problem [Memoization] url
  • Maximum sub-sequence [Filter] url
  • Gravity Centrifuge Tuning [BigInteger, Fibonacci] url
  • Brackets, Enhanced Edition [Stack] url
  • Sum of divisors [Math] url
  • Bust speeding vehicles [Map] url
  • Text formatting [String Manipulation] url
  • Snake encoding [Mutation] url
  • Next car license plate ? [String Manipulation] url
  • Polydivisible [BigInteger] url
  • Digit Sum Successor [Math, Time-Complexity] url
  • Mars Lander - Episode 2 [Distances, Trigonometry] url
  • Brackets, Ultimate EditionΧ© [Regex] url


  • Factorial vs Exponential [Math.log, Pre-Planning] url
  • Cryptarithm [Generators, Permutation, Set, Map] url
  • Vox Codei - Episode 1 [DFS, Brute-Force, Simulation] url
  • Winamax Sponsored Contest [Backtracking, Recursion] url
  • There is no Spoon - Episode 2 [Backtracking, Recursion] url
  • The Greatest Number [Loops, Conditions] url
  • The Last Crusade - Episode 2 [Backtracking, Pathfinding] url
  • The Labyrinth [BFS, Path Finding] url
  • The Bridge [DFS, Backtracking] url
  • Skynet Revolution - Episode 2 [Graphs, Pathfinding] url
  • Don't Panic - Episode 2 [Pathfinding] url
  • Super Computer [Greedy Algorithms, Scheduling] url
  • Roller Coaster [Dynamic Programming, Simulation] url
  • Surface [BFS, Flood Fill, Memoization, Recursion] url
  • CGX Formatter [Strings, Parsing] url
  • Power of Thor - Episode 2 [Barycenters, Pathfinding] url
  • TAN Network [Graphs, Pathfinding, Distances, Trigonometry] url
  • Genome Sequencing [Strings, Permutations] url
  • Bender - Episode 2 [Dynamic Programming, Memoization, Recursion, Pathfinding] url
  • Bender - Episode 3 [Regression Analysis] url

Very Hard

  • Nintendo Sponsored Contest [C++ Only, Bits, Polynomial] url
  • Nintendo Sponsored Contest [Dynamic Programming, Encoding, Memoization, Recursion] url
  • Mars Lander - Episode 3 [Distances, Trigonometry] url
  • Music Scores [Encoding, Image Processing, Pattern Recognition] url
  • Shadows of the Knight - Episode 2 [Binary Search, Intervals] url
  • Vox Codei - Episode 2 [DFS, Brute-Force, Pattern Recognition, Simulation] url
  • The Last Crusade - Episode 3 [Backtracking, Pathfinding] url

Integrate with Node.js

const readFileSync = require('fs').readFileSync
const inputFile = 'lib/'
const inArray = readFileSync(inputFile, 'utf8').split('\n')
const readline = () => inArray.shift()

// Use as normal readline function (Spider-Monkey) syntax;
const N = readline().split(' ').map(Number)


Dennis Vash - profile.

Codingame Puzzles Solutions

Elegant puzzles solutions πŸ–Š

Codingame Puzzles Solutions Info

⭐ Stars40
πŸ”— Source
πŸ•’ Last Updatea year ago
πŸ•’ Created4 years ago
🐞 Open Issues1
βž— Star-Issue Ratio40
😎 Authordenvash