Parsing coding challenges

Practise parsing with 12 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Easy · 8 Medium · 3 Hard · 1

Skills you'll practise: PolymorphismString splittingAdapter patternAggregating resultsBuilder patternEscapingExecuting instructionsFactory methodInput validationJSON formatJSON parsingOvertime math
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

12 challenges
Medium

Tournament Standings

Rank teams from match records.

You'll learn Aggregating resultsSorting with keys
DictionariesParsingSorting
No solutions yet
Hard

Mini Stack-Language Interpreter

Evaluate a small stack language.

You'll learn TokenizingExecuting instructions
InterpretersParsingStacks
No solutions yet
Easy

Acronym Generator

Create an acronym from the first letter of every word, in uppercase.

You'll learn String parsingWord splitting
ParsingStrings
No solutions yet
Easy

Shape Factory

Create shapes from text descriptions with a factory and return the area of each one.

You'll learn Factory methodPolymorphism
Design patternsParsingmath
No solutions yet
Easy

Temperature Sensor Adapter

Adapt readings from Fahrenheit, Kelvin and Celsius sensors to one Celsius interface.

You'll learn Adapter patternUnit conversion
Design patternsParsingmath
No solutions yet
Medium

Weekly Payroll

Total a week's pay for salaried, hourly and commission employees, each paid by its own rule.

You'll learn PolymorphismOvertime math
ParsingSimulationmath
No solutions yet
Easy

First Invalid Age

Validate typed ages and report where the first bad entry is instead of letting the program crash.

You'll learn ValidationParsing
BeginnerParsingStrings
No solutions yet
Easy

Build a JSON Object

Turn keys and values into a JSON object string, escaping quotes and backslashes correctly.

You'll learn JSON formatEscaping
ParsingStrings
No solutions yet
Easy

Count Log Levels

Read the lines of a log file and count how many are INFO, WARNING and ERROR.

You'll learn Reading linesString splitting
BeginnerParsingStrings
No solutions yet
Easy

Sum a Flat JSON Object

Parse a flat JSON object whose values are integers and add up the values.

You'll learn JSON parsingString splitting
ParsingStrings
No solutions yet
Medium

SQL Query Builder

Assemble a SQL query from parts given in any order, the way a builder object collects settings step by step.

You'll learn Builder patternString assembly
Design patternsParsingStrings
No solutions yet
Easy

Sum the Valid Numbers

Add up the entries that are whole numbers and skip everything else, the way try/except handles bad input.

You'll learn Try/exceptInput validation
BeginnerParsingStrings
No solutions yet