Skip to content

charlesfranciscodev/codingame

Repository files navigation

Solutions to CodinGame Puzzles

CodinGame

The "Solutions to CodinGame Puzzles" project is a collection of answers to coding problems from CodinGame. CodinGame is a website where people can practice coding by solving puzzles. In this project, people have written solutions to these puzzles using languages like Python, C++, and Java. Each solution is saved in a file named after the puzzle it solves. The puzzles range from easy to hard and cover different coding topics like variables, conditions, and arrays. The goal of the project is to help developers get better at problem-solving and learn different ways of coding. It also includes explanations to help people understand the solutions better.

Python Version

Puzzles

Easy Puzzles

Title Solution(s) Topic(s)
Onboarding 🛹 Python, JavaScript, C++ Variables, Input/Output, Conditions
The Descent 🌄 Python ★, Kotlin, TypeScript, C Conditions, Loops
Power of Thor 1 ⚡ Python ★, Kotlin, TypeScript, C++, Swift Input/Output, Conditions
Temperatures ❄️ Python ★, Kotlin, TypeScript, Ruby Conditions, Loops, Arrays
Mars Lander 1 🚀 Python, Kotlin, TypeScript ★, C++ Conditions, Loops
ASCII Art 🎨 Python, Kotlin, TypeScript, Ruby Strings
Unary 1️⃣ Python, TypeScript ★, Haskell, C# Strings, Encoding
MIME Type 🎵 Python ★, Kotlin, TypeScript, C# Strings, Hash Tables
Defibrillators 💖 Python ★, Kotlin, TypeScript, C# Strings, Trigonometry
Racing Duals 🏁 Python ★, Kotlin, JavaScript, Ruby Arrays, Sorting

Medium Puzzles

Title Solution(s) Topic(s)
Shadows of the Knight 1 🦇 Python ★, Kotlin, TypeScript Binary Search, 2D Arrays
There is no Spoon 1 🥄 Python ★, Kotlin, TypeScript, C++ 2D Arrays
DFS 1 🌆 Python ★, JavaScript Graphs, BFS
Don't Panic 1 🕶️ Python ★, Kotlin, TypeScript Conditions
War ♥️ ♦️ ♠️ ♣️ Python ★, Kotlin, TypeScript, C++ Queues, Card Games
Stock Exchange Losses 📈 Python Conditions, Loops
The Fall 1 💎 Python, JavaScript 2D Arrays
Network Cabling 🔌 Python Sorting, Median
Conway Sequence 👀 Python, Kotlin, C# Sequences
Telephone Numbers 📱 Python Tries
Dwarfs standing on giants 🏞️ Python ★, TypeScript Graphs, Recursion
Blunder 1 🍺 Python 2D Arrays, State Machine, Simulation
Scrabble 🔤 Python ★, Kotlin, TypeScript Strings, Hash Tables
The Gift 🎁 Python Arrays, Sorting, Greedy algorithms
Mayan Calculation 2️⃣0️⃣ Python, Kotlin ★, Ruby Strings

Hard Puzzles

Title Solution(s) Topic(s)
The Labyrinth 🌟 Python 2D Arrays, Graphs, BFS
DFS 2 🏙️ Python ★, Kotlin Graphs
Vox Codei 1 🎭 Python ★, C++ Simulation
Super Computer 📅 Python, Kotlin Sorting, Greedy Algorithms, Scheduling
Roller Coaster 🎢 Python Queues, Dynamic Programming, Simulation
Surface 🌊 Python ★, Kotlin 2D Arrays, Graphs, Flood Fill
CGX Formatter 🎻 Python Strings, Parsing
TAN Network 🚉 Python ★, Kotlin Graphs, Pathfinding
Genome Sequencing 🧬 Python Strings, Shortest Common Supersequence
Blunder 2 🎱 Python Pathfinding
Blunder 3 ⌛ Python Time Complexity

Poetry

# create a new virtual environment
conda create --name codingame python=3.11
conda activate codingame
pip3 install poetry

# Installing dependencies
poetry install --no-root

# Linting
poetry run ruff check .

# Formatting
poetry run ruff format .

General Tips

To effectively solve CodinGame puzzles, thoroughly understand the problem, break it into manageable steps, and use input/output specs for your solution. Employ appropriate data structures and algorithms like BFS, DFS, binary search, or sorting, optimizing for efficiency with techniques such as dynamic programming. Test against sample inputs, document your code well, collaborate, and explore different languages for skill development.

As you start learning to code on CodinGame, you're entering a world of puzzles that will test your skills in new ways. From adjusting simple things to solving harder problems with graphs and dynamic programming, you'll explore important programming ideas. Using Python, C++, or Java, you'll solve challenges like working with temperatures or helping Thor on adventures. Whether you're making pictures with characters or finding your way through a maze, each task will make you better at solving problems and teach you more about coding. Each puzzle you solve adds to a big collection of solutions, making a community of learners and creators. As you take on each challenge, you won't just get answers – you'll understand algorithms, data structures, and coding better. So, jump in, be creative, and enjoy learning and discovering new things on CodinGame.