Advanced coding challenges

Practise advanced with 20 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.

Medium · 3 Hard · 17

Skills you'll practise: Cycle detection2D grid traversal4-neighbor checksArea calculationBitmask DPConvolution kernelsCustom sortingDAG DPDivide and conquerDivisor sieveEdge countingFrequency maps
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
341
Challenges
245
Solutions shared
9
Languages

All challenges

Search by name or topic, or filter by difficulty.

20 challenges
Medium

Game of Life Step

Advance Conway's Game of Life by one generation.

You'll learn Grid simulationNeighbor counting
AdvancedGridsHackathonSimulation
Hard

Shortest Delivery Tour

Visit every city once and return home as cheaply as possible.

You'll learn Bitmask DPTraveling salesman
AdvancedBitmasksCompetitive-programmingDynamic-programming
Hard

Minimum Window Substring

Find the shortest piece of text containing all required characters.

You'll learn Grow and shrink windowsFrequency maps
AdvancedCompetitive-programmingSliding-windowStrings
Hard

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

You'll learn Topological orderDAG DP
AdvancedGraphsHackathonTopological-sort
Medium

K-th Smallest Element

Find the k-th smallest value without fully sorting.

You'll learn QuickselectPartitioning
AdvancedCompetitive-programmingSorting
Hard

Word Break

Decide whether text can be split into dictionary words.

You'll learn Prefix DPString segmentation
AdvancedDynamic-programmingHackathonStrings
Hard

Median of Two Sorted Arrays

Find the median of two sorted lists combined.

You'll learn Partition searchO(log n)
AdvancedBinary-searchCompetitive-programming
Hard

Strongly Connected Components

Count groups of nodes that can all reach each other.

You'll learn Graph algorithmsTarjan or Kosaraju
AdvancedCompetitive-programmingGraphs
Hard

Course Schedule Order

Order courses so every prerequisite comes first.

You'll learn Kahn's algorithmCycle detection
AdvancedGraphsHackathonTopological-sort
Hard

Largest Rectangle in a Histogram

Find the largest rectangle that fits under a histogram.

You'll learn Monotonic stackArea calculation
AdvancedCompetitive-programmingStacks
Medium

Island Perimeter

Measure the coastline of land cells in a grid.

You'll learn Edge counting4-neighbor checks
AdvancedGridsHackathon
Hard

Trapping Rain Water

Compute how much rain water an elevation map holds.

You'll learn Two pointersPrefix maxima
AdvancedArraysCompetitive-programmingGreedy
Hard

Count Inversions

Count the out-of-order pairs in a list.

You'll learn Merge sortDivide and conquer
AdvancedCompetitive-programmingSorting
Hard

Sliding Window Maximum

Report the maximum of every window of k numbers.

You'll learn Monotonic dequeO(n) windows
AdvancedCompetitive-programmingSliding-window
Hard

Matrix Chain Multiplication

Find the cheapest order to multiply a chain of matrices.

You'll learn Interval DPOptimization
AdvancedCompetitive-programmingDynamic-programming
Hard

Edge Detection (Sobel Filter)

Run the Sobel filter over a grayscale pixel grid and return the edge strength of every pixel.

You'll learn 2D grid traversalConvolution kernels
AdvancedCS1CS50 styleGridsHomeworkImage processingIntro programmingMatricesStudent-beginner
No solutions yet
Hard

Longest Recurring Cycle

Find the d up to a limit whose fraction 1/d has the longest repeating decimal block.

You'll learn Long divisionCycle detection
AdvancedCompetitive-programmingDFSNumber-theoryProject Euler stylemath
No solutions yet
Hard

Digit Factorial Chains

Count starting numbers whose digit factorial chain has exactly a given number of distinct terms.

You'll learn Cycle detectionMemoization
AdvancedCompetitive-programmingNumber-theoryProject Euler stylemath
No solutions yet