Skip to content

Latest commit

 

History

History
99 lines (80 loc) · 8.74 KB

README.md

File metadata and controls

99 lines (80 loc) · 8.74 KB

Solutions to CodinGame Puzzles

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 Ruff

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, Bash, Swift Input/Output, Conditions
Temperatures ❄️ Python, Kotlin, TypeScript, Ruby Conditions, Loops, Arrays
Mars Lander 1 🚀 Python, Kotlin, TypeScript ★, C++, 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, JavaScript, C# Strings, Trigonometry
Horse-racing Duals 🏁 Python ★, Kotlin, JavaScript 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.12
conda activate codingame
pip3 install poetry

# Installing dependencies
poetry install --no-root

# Linting
poetry run ruff check .

# Formatting
poetry run ruff format .

# Update Python version
conda update python

# Update ruff version
poetry add ruff@latest --dev

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.

Learning Opportunities

CodinGame is an ideal platform for aspiring programmers to practice and improve their coding skills in a variety of programming languages. It offers a wide range of challenges, puzzles, and games that cater to different skill levels, from beginner to advanced. The platform provides a fun and engaging environment for coders to learn from their peers and develop their coding skills. CodinGame helps programmers:

  • Develop problem-solving skills and learn new algorithms and techniques.
  • Practice writing clean, efficient, and well-documented code.
  • Learn new programming languages and compare different language implementations.
  • Develop debugging skills and learn how to use tools to identify and fix errors.
  • Learn about the importance of time complexity and optimization.
  • Learn how to approach large problems by breaking them down into smaller, manageable steps.
  • Learn how to collaborate with others and build a team-based learning experience.