Add Binary
Implement a function to add two binary strings and return the result as a binary string.
Balanced Binary Tree
Implement a function to determine if a binary tree is height-balanced.
Balanced Brackets
Implement a function to determine if a string contains balanced brackets.
Binary Search
Implement a function to search for a target in a sorted array using binary search.
Binary Search Tree Lowest Common Ancestor
Implement a function to find the LCA in a binary search tree.
Binary Tree Maximum Depth
Implement a function to find the maximum depth of a binary tree.
Binary Tree Subtree
Implement a function to check if a binary tree is a subtree of another binary tree.
Bit Counting
Implement a function to find number of set bits from 0 to n.
Bit Reversal
Implement a function to flip the order of the bits in a given number.
Count Set Bits in a Binary Number
Implement a function to find set bits in binary representation of a given integer.
Diameter of Binary Tree
Implement a function to find the diameter (longest path) of a binary tree.
Find Duplicates in Array
Implement a function to check if there are any duplicate numbers in the array.
First Bad Version
Implement a function to find the first bad version using minimum API calls.
Flip Binary Tree
Implement a function to flip the nodes in a binary tree.
Flood Fill
Implement a function to perform flood fill on an image grid.
Linked List Detect Cycle
Implement a function to detect if there are cycles in a linked list.
Linked List Reversal
Implement a function to reverse a linked list.
Linked Lists Combine Two Sorted
Implement a function to combine two sorted linked lists.
Longest Palindrome
Implement a function to find the length of the longest palindrome that can be built from given letters.
Middle of the Linked List
Implement a function to find the middle node of a linked list.
Most Common Elements
Implement a function to determine the most common elements in an integer array.
Optimal Stock Trading
Implement a function to find the maximum profit achievable by buying and selling a stock once.
Pair Sum
Implement a function to find two numbers within an array of integers that add up to a target integer.
Ransom Note
Implement a function to check if a ransom note can be formed from a magazine.
Staircase Climbing Combinations
Implement a function to find the number of ways to reach the top of a staircase.
String Anagram
Implement a function to determine if two strings are anagrams of each other.
String Palindrome
Implement a function to determine if a string is a palindrome.
01 Matrix
Implement a function to find the distance of each cell to the nearest 0 in a binary matrix.
Accounts Merge
Implement a function to merge accounts that share common emails.
Array Product Excluding Current
Implement a function to find the product of elements in an array excluding the current element.
Binary Search Tree Kth Smallest Element
Implement a function to find the kth smallest node in a BST.
Binary Tree Level Order Traversal
Implement a function to find the level order traversal of a binary tree.
Binary Tree Rebuilding from Preorder and Inorder Traversals
Implement a function to construct a binary tree from preorder and inorder traversals.
Binary Tree Right Side View
Implement a function to return the right side view of a binary tree.
Combinations for Target Sum
Implement a function to count combinations that sum to the target.
Count Islands in a Grid
Implement a function to count distinct islands in a 2D binary grid.
Course Dependency
Implement a function to check if all courses can be completed given prerequisites.
Decode Message
Implement a function to count ways to decode a numeric string.
Disjoint Intervals
Implement a function to determine the minimum amount of removals to get non-overlapping intervals.
Distinct Paths in Grid
Implement a function to calculate distinct paths for a robot moving on an m x n grid.
Evaluate Reverse Polish Notation
Implement a function to evaluate an expression in Reverse Polish Notation.
Find All Anagrams in a String
Implement a function to find all starting indices of anagrams of p in string s.
Find Element in Rotated Array
Implement a function to find an integer in a rotated sorted array.
Find the Longest Palindromic Substring
Implement a function to find the longest palindromic substring.
Find Word in Grid
Implement a function to check the existence of a word in a grid.
Graph Clone
Implement a function to deeply clone a connected and undirected graph.
Graph Count Connected Components
Implement a function to count connected components in a graph.
Is the Graph a Tree
Implement a function to determine if a graph is a valid tree.
K Closest Points to Origin
Implement a function to find the k closest points to the origin.
Letter Combinations of a Phone Number
Implement a function to return all letter combinations that a phone number could represent.
Longest Increasing Subsequence
Implement a function to find the length of the longest increasing subsequence.
Longest Non-repeating Substring
Implement a function to find the length of longest substring with unique characters.
Longest Repeating Substring After Replacements
Implement a function to find the longest uniform substring after up to k replacements.
Lowest Common Ancestor of a Binary Tree
Implement a function to find the lowest common ancestor of two nodes in a binary tree.
Matrix Rotation
Implement a function to rotate the given matrix by 90 degrees.
Matrix Spiral Traversal
Implement a function to traverse the matrix in spiral order.
Matrix Zeroing
Implement a function to set matrix rows and columns to zero.
Maximum Sum in Contiguous Array
Implement a function to find the subarray with the maximum sum.
Maximum Water Trapped Between Walls
Implement a function to find the maximum water volume between two walls in an array of walls.
Merge New Interval
Implement a function to insert a new interval into a sorted list of non-overlapping intervals, merging if necessary.
Merge Overlapping Intervals
Implement a function to merge overlapping intervals.
Minimum Coins for Change
Implement a function to return minimum coins needed to make the given amount.
Minimum Height Trees
Implement a function to find all root labels that give minimum height trees.
Palindromic Substrings
Implement a function to count all palindromic substrings in a string.
Partition Equal Subset Sum
Implement a function to determine if an array can be partitioned into two subsets with equal sum.
Permutations
Implement a function to generate all permutations of an array of distinct integers.
Rotting Oranges
Implement a function to find the minimum time for all oranges to rot.
Segment Words
Implement a function to check whether a string be formed from dictionary words.
Sort Colors
Implement a function to sort an array of 0s, 1s, and 2s in-place (Dutch National Flag).
String Anagram Groups
Implement a function to group an array of strings into anagrams.
String to Integer (atoi)
Implement a function to convert a string to a 32-bit signed integer (like C's atoi).
Subsets
Implement a function to generate all possible subsets (the power set) of an array.
Sum Without Addition
Implement a function to find the sum of two integers without using + and - operator.
Task Coordination
Implement a function to find minimum intervals for tasks with cooldown.
Trie (Prefix Tree)
Implement a trie-prefix-tree with insert, search, and starts with functionality.
Triplet Sum
Implement a function to find all unique triplets with distinct indices that sum to 0.
Validate Binary Search Tree
Implement a function to validate whether a binary tree is a valid binary search tree.
Basic Calculator
Implement a basic calculator to evaluate a string expression with +, -, and parentheses.
Binary Tree Equal
Implement a function to determine whether two binary trees are equal.
Binary Tree Maximum Total Path
Implement a function to find the maximum total of nodes in a binary tree path.
Delete Nth Node from End of Linked List
Implement a function to delete the nth node from the end of a linked list.
End of Array Reachable
Implement a function to determine if the end of the array is reachable.
Extraterrestrial Language
Implement a function to verify and return an extraterrestrial language's alphabet order.
Find Missing Number in Sequence
Implement a function to find the missing element in a sorted array.
Find Words in Grid
Implement a function to find all the words present in the grid.
Largest Rectangle in Histogram
Find the area of the largest rectangle in a histogram.
Linked Lists Combine K Sorted
Implement a function to combine k sorted linked lists.
Longest Common Subsequence
Implement a function to find the longest common subsequence in two strings.
Longest Consecutive Number Sequence
Implement a function to find the length of the longest consecutive number sequence.
Maximum Product in Contiguous Array
Implement a function to find the subarray which has the largest product.
Maximum Profit in Job Scheduling
Find the maximum profit you can achieve by scheduling non-overlapping jobs.
Meeting Calendar
Implement a function to check if all meetings can be attended without conflict.
Minimum Meeting Rooms Needed
Implement a function to find the minimum number of conference rooms required to hold all meetings.
Neighborhood Theft
Implement a function to find maximum money to rob without alerting police.
Neighborhood Theft (Circular)
Implement a function to find maximum money to rob in circular houses without alerting police.
Number Stream Median
Implement a function to find the median of a dynamic stream of integers.
Ocean Flow
Implement a function returning cells with water flow to both oceans.
Rearrange Linked List
Implement a function to rearrange the nodes in a linked list.
Shortest Substring Containing Characters
Implement a function to return the smallest substring of a string containing all characters from another string.
Smallest Element in Rotated Sorted Array
Implement a function to find the smallest element in rotated sorted array.
Trapping Rain Water
Compute how much rainwater can be trapped between elevation bars.
Word Finder
Implement a data structure where words can be added and support wildcard searching.
Word Ladder
Find the length of the shortest transformation sequence from beginWord to endWord.