Skip to main content
SYSTEM_ARENA: ONLINE

Coding Challenges

Push your limits with hand-crafted algorithmic challenges. Solve problems across Trees, Graphs, Dynamic Programming, and more — with interactive code editors and real test cases.

Total 57
Trees 15
DP 20
Sorting 19
Streak 5 days
🌳 Trees Track Now Live!15 new challenges added
Easy: 5Medium: 5Hard: 5
🧩 Dynamic Programming Track Now Live!20 new challenges added
Easy: 5Medium: 7Hard: 8
📊 Sorting Algorithms Track Now Live!19 new challenges added
Easy: 5Medium: 7Hard: 7
Topic:
Level:
Showing 57 challenges
Challenge

Challenge 1: Data Structures-1

Solve the problem within 30 minutes to earn points and rank up.

30 min
Solve
Challenge

Challenge 2: Data Structures-2

Solve this challenging problem within 30 minutes to earn even more points!

30 min
Solve
Challenge

Challenge 3: Advanced Data Structures

Solve this challenging problem within 60 minutes to earn even more points!

60 min
Solve
Easy Trees

Tree Traversals (Inorder, Preorder, Postorder)

Return all three traversals of a binary tree. Great entry point into recursive tree thinking.

20 min
Solve
Easy Trees

Maximum Depth of Binary Tree

Find the length of the longest root-to-leaf path using elegant recursion.

15 min
Solve
Easy Trees

Count Leaf Nodes

Count all nodes with no children — a clean exercise in base-case thinking.

15 min
Solve
Easy Trees

Sum of All Nodes

Compute the sum of every node value in the binary tree recursively.

15 min
Solve
Easy Trees

Symmetric Tree

Determine whether a binary tree is a mirror image of itself.

15 min
Solve
Medium Trees

Level Order Traversal

Traverse a binary tree level by level using BFS — a classic queue-based challenge.

25 min
Solve
Medium Trees

Lowest Common Ancestor

Find the deepest node that is a common ancestor of two given nodes.

30 min
Solve
Medium Trees

Validate Binary Search Tree

Verify that a binary tree satisfies all BST properties using bounds propagation.

25 min
Solve
Medium Trees

Diameter of Binary Tree

Find the longest path (in edges) between any two nodes in the tree.

25 min
Solve
Medium Trees

Left View / Right View of Binary Tree

Return the first and last visible node at every level of the tree.

25 min
Solve
Hard Trees

Serialize and Deserialize Binary Tree

Design an encode/decode scheme so any tree can be stored and fully reconstructed.

45 min
Solve
Hard Trees

Vertical Order Traversal

Group tree nodes by column position, breaking ties by row then value.

40 min
Solve
Hard Trees

Construct Tree from Traversal Arrays

Rebuild a unique binary tree given its preorder and inorder traversals.

45 min
Solve
Hard Trees

Binary Tree Maximum Path Sum

Find the highest-sum path between any two nodes — negative values make it tricky.

45 min
Solve
Hard Trees

Recover Binary Search Tree

Two BST nodes were swapped by mistake. Restore the tree in O(n) time.

50 min
Solve
Easy DP

Fibonacci Number

Calculate the n-th Fibonacci number using dynamic programming — the classic introduction to memoization and tabulation.

10 min
Solve
Easy DP

Climbing Stairs

Count the distinct ways to climb n stairs taking 1 or 2 steps at a time — identical recurrence to Fibonacci.

15 min
Solve
Easy DP

Min Cost Climbing Stairs

Find the minimum cost to reach the top of a staircase given a cost array — classic DP optimization.

15 min
Solve
Easy DP

House Robber

Maximize loot from non-adjacent houses — a foundational DP problem with a beautiful two-variable space optimization.

20 min
Solve
Easy DP

Coin Change (Minimum Coins)

Find the fewest coins to reach a target amount — introducing unbounded knapsack DP.

25 min
Solve
Medium DP

Longest Increasing Subsequence (LIS)

Find the length of the longest strictly increasing subsequence — a cornerstone of sequence DP.

25 min
Solve
Medium DP

Longest Common Subsequence (LCS)

Return the length of the longest common subsequence of two strings — the canonical 2D DP problem.

30 min
Solve
Medium DP

0/1 Knapsack

Pack a knapsack to maximize value without exceeding capacity — the quintessential DP on items.

30 min
Solve
Medium DP

Partition Equal Subset Sum

Determine if an array can be split into two subsets with equal sum — a knapsack variant with a twist.

25 min
Solve
Medium DP

Decode Ways

Count the number of ways to decode a digit string to letters — blending DP with string parsing.

30 min
Solve
Medium DP

Unique Paths

Count distinct paths from top-left to bottom-right of a grid — the quintessential 2D DP grid problem.

25 min
Solve
Medium DP

Edit Distance

Find the minimum edit operations (insert, delete, replace) to convert one string to another — classic interval DP.

30 min
Solve
Hard DP

Coin Change II

Count the number of combinations that sum to a target amount — unbounded knapsack counting variant.

30 min
Solve
Hard DP

Matrix Chain Multiplication

Find the optimal parenthesization of matrix products to minimize scalar multiplications — interval DP at its finest.

35 min
Solve
Hard DP

Longest Palindromic Subsequence

Find the longest subsequence of a string that is a palindrome — interval DP on a single string.

30 min
Solve
Hard DP

Burst Balloons

Maximize coins by strategically bursting balloons — a tricky interval DP problem of choosing the last element.

40 min
Solve
Hard DP

Rod Cutting Problem

Maximize revenue by cutting a rod into pieces of varying lengths — unbounded knapsack meets optimization.

30 min
Solve
Hard DP

Egg Dropping Puzzle

Find the minimum number of trials to identify the critical floor — a deceptively hard DP problem with a clever reformulation.

40 min
Solve
Hard DP

DP on Trees

Rob houses arranged as a binary tree without triggering alarms — applying DP to tree structures with post-order DFS.

45 min
Solve
Hard DP

DP with Bitmasking

Solve the Travelling Salesman Problem using bitmask DP — representing visited city sets as integers for exponential state compression.

45 min
Solve
Easy Sorting

Implement Bubble Sort

Sort an array using the Bubble Sort algorithm.

15 min
Solve
Easy Sorting

Implement Selection Sort

Sort an array using the Selection Sort algorithm.

15 min
Solve
Easy Sorting

Implement Insertion Sort

Sort an array using the Insertion Sort algorithm.

15 min
Solve
Easy Sorting

Sort an Array

Sort an array in ascending order in O(n log n) time.

15 min
Solve
Easy Sorting

Check if an Array is Sorted

Check if an array is strictly increasing.

10 min
Solve
Medium Sorting

Implement Merge Sort

Sort an array using the Merge Sort algorithm.

25 min
Solve
Medium Sorting

Implement Quick Sort

Sort an array using the Quick Sort algorithm.

30 min
Solve
Medium Sorting

Implement Heap Sort

Sort an array using the Heap Sort algorithm.

30 min
Solve
Medium Sorting

Sort Colors

Sort an array of 0s, 1s, and 2s in-place (Dutch National Flag).

25 min
Solve
Medium Sorting

Merge Two Sorted Arrays

Merge two sorted arrays into one sorted array in-place.

25 min
Solve
Medium Sorting

Kth Largest Element in an Array

Find the kth largest element without fully sorting the array.

30 min
Solve
Medium Sorting

Relative Sort Array

Sort an array based on the ordering of a second array.

25 min
Solve
Hard Sorting

Count Inversions in an Array

Find how far an array is from being sorted.

45 min
Solve
Hard Sorting

External Sorting Concepts

Merge multiple sorted chunks simulating external disk sorting.

50 min
Solve
Hard Sorting

Merge K Sorted Arrays

Merge K sorted arrays into a single sorted array.

45 min
Solve
Hard Sorting

Merge K Sorted Linked Lists

Merge multiple sorted linked lists (simulated as arrays).

50 min
Solve
Hard Sorting

Top K Frequent Elements

Find the top k most frequent elements in an array.

40 min
Solve
Hard Sorting

Sort Characters by Frequency

Sort a string based on the frequency of its characters.

35 min
Solve
Hard Sorting

Median of Two Sorted Arrays

Find the median of two sorted arrays in logarithmic time.

60 min
Solve