Coding Practice Platform

Master Coding.
One Problem at a Time.

Practice DSA, algorithms, data structures and interview questions in Python, C, C++, Java, JavaScript, TypeScript and SQL.

View Roadmaps →
10,000+
Target Practice Problems
12
Easy Problems
15
Medium Problems
3
Hard Problems

Practice Problems

Showing 30 of 30 problems
#1EasyDSA

Two Sum

Find two numbers in an array that add up to the given target.

ArrayHash Table
Solve →7 languages
#2EasyDSA

Valid Parentheses

Determine whether brackets in a string are correctly balanced.

StackString
Solve →7 languages
#3EasyStrings

Valid Palindrome

Check whether a string is a palindrome after normalization.

StringTwo Pointers
Solve →7 languages
#4EasySearching

Binary Search

Search for a target value inside a sorted array.

ArrayBinary Search
Solve →7 languages
#5EasyArrays

Best Time to Buy and Sell Stock

Find the maximum profit possible from buying and selling a stock.

ArrayGreedy
Solve →7 languages
#6MediumDynamic Programming

Maximum Subarray

Find the contiguous subarray with the largest sum.

ArrayDPKadane
Solve →7 languages
#7EasyLinked List

Merge Two Sorted Lists

Merge two sorted linked lists into one sorted list.

Linked ListRecursion
Solve →7 languages
#8EasyLinked List

Reverse Linked List

Reverse a singly linked list.

Linked List
Solve →7 languages
#9EasyDynamic Programming

Climbing Stairs

Count the number of distinct ways to climb a staircase.

DPRecursion
Solve →7 languages
#10EasyArrays

Majority Element

Find the element that appears more than half the time.

ArrayHash Table
Solve →7 languages
#11MediumStrings

Longest Substring Without Repeating Characters

Find the length of the longest substring without duplicate characters.

StringSliding Window
Solve →7 languages
#12MediumTwo Pointers

Container With Most Water

Find two lines that form a container holding the maximum amount of water.

ArrayTwo Pointers
Solve →7 languages
#13MediumArrays

3Sum

Find all unique triplets whose values sum to zero.

ArrayTwo Pointers
Solve →7 languages
#14MediumIntervals

Merge Intervals

Merge all overlapping intervals.

ArraySorting
Solve →7 languages
#15MediumGraphs

Course Schedule

Determine whether all courses can be completed given prerequisites.

GraphBFSDFS
Solve →7 languages
#16MediumGraphs

Number of Islands

Count the number of islands in a grid.

GraphDFSBFS
Solve →7 languages
#17MediumTrees

Binary Tree Level Order Traversal

Return the level-order traversal of a binary tree.

TreeBFS
Solve →7 languages
#18MediumTrees

Lowest Common Ancestor of a Binary Tree

Find the lowest common ancestor of two nodes in a binary tree.

TreeDFS
Solve →7 languages
#19MediumDynamic Programming

Word Break

Determine whether a string can be segmented into dictionary words.

DPString
Solve →7 languages
#20MediumDynamic Programming

Coin Change

Find the minimum number of coins required to make a given amount.

DPArray
Solve →7 languages
#21HardArrays

Trapping Rain Water

Calculate how much rain water can be trapped between elevation bars.

ArrayTwo PointersStack
Solve →7 languages
#22HardHeap

Merge K Sorted Lists

Merge multiple sorted linked lists into one sorted linked list.

HeapLinked List
Solve →7 languages
#23HardDynamic Programming

Edit Distance

Find the minimum operations required to transform one string into another.

DPString
Solve →7 languages
#24MediumDesign

LRU Cache

Design a cache supporting constant-time get and put operations.

Hash TableLinked List
Solve →7 languages
#25MediumTrees

Implement Trie

Implement a trie supporting insert, search and prefix operations.

TrieString
Solve →7 languages
#26MediumHeap

Kth Largest Element

Find the kth largest element in an unsorted array.

HeapSorting
Solve →7 languages
#27EasyRecursion

Fibonacci Number

Calculate the nth Fibonacci number efficiently.

DPRecursion
Solve →7 languages
#28EasyStrings

Reverse String

Reverse an array of characters in place.

StringTwo Pointers
Solve →7 languages
#29EasyArrays

Contains Duplicate

Determine whether an array contains duplicate values.

ArrayHash Table
Solve →7 languages
#30MediumStrings

Group Anagrams

Group strings that are anagrams of each other.

StringHash Table
Solve →7 languages