Back to Resources

    Challenge Problems

    Sharpen your skills with curated coding challenges from beginner to advanced

    How to Approach Coding Challenges

    Understand Before You Code

    Read the problem twice. Write out examples by hand. Identify inputs, outputs, and edge cases before touching your keyboard.

    Break It Down

    Decompose complex problems into smaller sub-problems. Solve each piece independently, then combine them into a full solution.

    Start Simple, Then Optimize

    Get a working brute-force solution first. Once it works, analyze its time and space complexity, then look for ways to improve.

    Practice Consistently

    Solving one problem a day is better than cramming ten in one session. Consistency builds pattern recognition over time.

    String Manipulation

    Master text processing — one of the most common tasks in real-world programming. From reversing strings to parsing complex patterns, these challenges build a foundation you'll use every day.

    Reverse a String

    Easy

    Write a function that takes a string and returns it reversed. Consider edge cases like empty strings and single characters.

    Try It

    Palindrome Checker

    Easy

    Determine if a given string reads the same forwards and backwards. Ignore spaces, punctuation, and case.

    Try It

    Anagram Detector

    Medium

    Check if two strings are anagrams of each other (contain the same characters in different order).

    Try It

    Caesar Cipher

    Medium

    Implement encryption and decryption using the Caesar cipher — shift each letter by a fixed number of positions.

    Try It

    Longest Substring Without Repeats

    Hard

    Find the length of the longest substring that contains no repeating characters. This is a classic sliding window problem.

    Try It

    Array & List Challenges

    Arrays are the backbone of data structures. These challenges teach you to think about iteration, sorting, searching, and efficient data access patterns.

    Two Sum

    Easy

    Given an array of numbers and a target, find two numbers that add up to the target. Return their indices.

    Try It

    Remove Duplicates

    Easy

    Remove all duplicate values from an array while maintaining the original order of elements.

    Try It

    Rotate Array

    Medium

    Rotate an array to the right by K steps. For example, [1,2,3,4,5] rotated by 2 becomes [4,5,1,2,3].

    Try It

    Merge Sorted Arrays

    Medium

    Merge two sorted arrays into one sorted array without using built-in sort functions.

    Try It

    Maximum Subarray Sum

    Hard

    Find the contiguous subarray with the largest sum. This is known as Kadane's Algorithm — a must-know for interviews.

    Try It

    Math & Logic

    Sharpen your logical thinking with mathematical challenges. These problems train you to break complex problems into smaller, solvable steps — a core programming skill.

    FizzBuzz

    Easy

    Print numbers 1-100 but replace multiples of 3 with 'Fizz', multiples of 5 with 'Buzz', and multiples of both with 'FizzBuzz'.

    Try It

    Fibonacci Sequence

    Easy

    Generate the first N numbers of the Fibonacci sequence where each number is the sum of the two preceding ones.

    Try It

    Prime Number Generator

    Medium

    Write a function that finds all prime numbers up to N. Bonus: implement the Sieve of Eratosthenes for efficiency.

    Try It

    Roman Numeral Converter

    Medium

    Convert integers to Roman numerals and vice versa. Handle values from 1 to 3999.

    Try It

    Tower of Hanoi

    Hard

    Solve the classic Tower of Hanoi puzzle recursively — move N disks from one peg to another using a helper peg.

    Try It

    Data Structures

    Understanding data structures is what separates a beginner from an intermediate developer. Build these from scratch to truly understand how they work under the hood.

    Implement a Stack

    Easy

    Build a stack data structure with push, pop, peek, and isEmpty methods. Stacks follow Last-In-First-Out (LIFO) ordering.

    Try It

    Implement a Queue

    Easy

    Build a queue with enqueue, dequeue, and peek methods. Queues follow First-In-First-Out (FIFO) ordering.

    Try It

    Linked List Operations

    Medium

    Create a singly linked list with insert, delete, search, and reverse operations.

    Try It

    Binary Search Tree

    Medium

    Implement a BST with insert, search, and traversal (in-order, pre-order, post-order) methods.

    Try It

    Hash Table from Scratch

    Hard

    Build your own hash table with collision handling. Implement put, get, delete, and resize operations.

    Try It

    Algorithm Challenges

    Algorithms are the recipes of programming. Master sorting, searching, and optimization techniques that form the basis of efficient software engineering.

    Binary Search

    Easy

    Search for a target value in a sorted array by repeatedly dividing the search interval in half.

    Try It

    Bubble Sort Implementation

    Easy

    Implement bubble sort and understand its O(n²) time complexity. Then optimize it with an early termination flag.

    Try It

    Merge Sort

    Medium

    Implement the divide-and-conquer merge sort algorithm. Understand why it's O(n log n) and when to use it.

    Try It

    Depth-First Search

    Medium

    Traverse a graph or tree using DFS. Implement both recursive and iterative versions.

    Try It

    Dijkstra's Shortest Path

    Hard

    Find the shortest path between nodes in a weighted graph using Dijkstra's algorithm.

    Try It

    Web & API Challenges

    Put your skills into practice with real-world web development challenges. These tasks mirror what professional developers do every day.

    Build a To-Do List

    Easy

    Create a functional to-do app with add, delete, and mark-as-complete features. Use localStorage for persistence.

    Try It

    Fetch & Display API Data

    Easy

    Call a public API (like a weather or joke API), handle the response, and display the data in a clean UI.

    Try It

    Build a Calculator

    Medium

    Create a calculator that handles basic operations, decimal numbers, and follows order of operations.

    Try It

    Pagination System

    Medium

    Build a reusable pagination component that handles large datasets with previous/next and page number navigation.

    Try It

    Real-Time Chat Interface

    Hard

    Design a chat UI with message bubbles, timestamps, typing indicators, and auto-scrolling to the latest message.

    Try It

    Algorithm & Problem-Solving Glossary

    Time Complexity

    A measure of how an algorithm's runtime grows as the input size increases. Expressed using Big O notation (e.g., O(n), O(log n), O(n²)).

    Space Complexity

    How much additional memory an algorithm needs relative to input size. In-place algorithms use O(1) extra space.

    Big O Notation

    A mathematical notation describing the upper bound of an algorithm's growth rate. O(1) is constant, O(n) is linear, O(n²) is quadratic.

    Brute Force

    A straightforward approach that tries every possibility. Often the simplest solution but usually not the most efficient.

    Edge Case

    An unusual or extreme input that might cause your solution to fail — like empty arrays, negative numbers, or very large values.

    Recursion

    A technique where a function calls itself to solve smaller instances of the same problem. Every recursive solution needs a base case to stop.

    Sliding Window

    A technique for processing sequential data by maintaining a 'window' that moves through the data, avoiding redundant computations.

    Divide and Conquer

    An algorithm design paradigm that breaks a problem into smaller subproblems, solves them independently, and combines the results.

    Dynamic Programming

    Solving complex problems by breaking them into overlapping subproblems and storing results to avoid redundant calculations (memoization).

    Greedy Algorithm

    An approach that makes the locally optimal choice at each step, hoping to find the global optimum. Works for some problems but not all.

    Ready to Start Coding?

    Open the Try It Yourself editor, pick a challenge, and start solving. The best way to learn is by doing!

    Cookie & Privacy Settings

    We use cookies to improve your experience, analyze traffic, and show personalized ads. You can manage your preferences below.

    By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising. You can customize your preferences or reject non-essential cookies.

    Privacy PolicyTerms of Service