Coding Problems
Practice your coding skills with our collection of problems. Click on a problem to view its details.
Two Sum
Find indices of two numbers in an array that add up to a specific target.
View Problem SolveProduct of Array Except Self
Return an array such that each element is the product of all elements except itself.
View Problem SolveLongest Substring Without Repeating Characters
Find the longest substring without repeating characters.
View Problem SolveEdit Distance
Find the minimum number of operations to convert one string to another.
View Problem SolveLowest Common Ancestor
Find the lowest common ancestor of two nodes in a binary tree.
View Problem SolveValidate Binary Search Tree
Check if a binary tree is a valid binary search tree.
View Problem SolveCourse Schedule
Determine if you can finish all courses given their prerequisites.
View Problem SolveSingle Number
Find the number that appears only once in an array where every other number appears twice.
View Problem SolveJump Game
Determine if you can reach the last index of an array with given jumps.
View Problem SolveSliding Window Maximum
Find the maximum element in every sliding window of size k.
View Problem SolveSearch in Rotated Sorted Array
Search for a target element in a rotated sorted array.
View Problem SolveNumber of Connected Components
Find the number of connected components in an undirected graph.
View Problem SolveBinary Tree Right Side View
Return the values of the nodes that are visible from the right side of a binary tree.
View Problem SolveFind Missing Number
Find the missing number in an array containing numbers from 1 to N.
View Problem SolveMaximum Product Subarray
Find the contiguous subarray that gives the maximum product.
View Problem SolveNetwork Delay Time
Find the time it takes for all nodes to receive a signal in a weighted graph.
View Problem SolveLongest Palindromic Substring
Find the longest palindromic substring in a string.
View Problem SolveLongest Common Subsequence
Find the length of the longest common subsequence between two strings.
View Problem SolveMinimum Path Sum
Find the path with the minimum sum from top-left to bottom-right in a grid.
View Problem SolveUnique Paths
Find the number of unique paths from top-left to bottom-right in a grid.
View Problem SolveN-Queens
Place N queens on an N×N chessboard such that no two queens threaten each other.
View Problem SolveInsert Interval
Insert a new interval into a sorted list of non-overlapping intervals.
View Problem SolveSpiral Matrix II
Generate a square matrix filled with elements from 1 to n^2 in spiral order.
View Problem SolveUnique Paths
Find the number of unique paths from top-left to bottom-right corner of a grid.
View Problem SolveMinimum Path Sum
Find the path with the minimum sum from top-left to bottom-right in a grid.
View Problem SolveFind the First and Last Position of Element
Find the starting and ending position of a given target.
View Problem SolveMaximize Sum of Array After K Negations
Maximize the sum of an array by flipping at most K elements.
View Problem SolveFind Two Elements That Sum to K
Find two elements in an array that add up to a target value K.
View Problem SolveFind the Next Permutation
Find the next lexicographical permutation of a sequence.
View Problem SolveFind the Majority Element II
Find all elements that appear more than N/3 times in an array.
View Problem SolveK-th Smallest in Lexicographical Order
Find the K-th smallest number in lexicographical order among all integers from 1 to N.
View Problem SolveFind K-th Smallest Pair Distance
Find the K-th smallest distance between two elements in an array.
View Problem SolveMaximize Distance to Closest Person
Find the maximum distance to the closest person in a row of seats.
View Problem SolveMinimum Number of Arrows to Burst Balloons
Find the minimum number of arrows needed to burst all balloons.
View Problem SolveMinimum Number of Refueling Stops
Find the minimum number of refueling stops needed to reach a destination.
View Problem SolveMinimum Cost to Merge Stones
Find the minimum cost to merge stones into a single pile.
View Problem SolveMinimum Number of Operations to Make Array Continuous
Find the minimum number of operations needed to make an array continuous.
View Problem SolveMinimum Number of Operations to Make Array Sorted
Find the minimum number of operations needed to make an array sorted.
View Problem SolveMinimum Number of Operations to Make Array Sorted II
Find the minimum number of operations needed to make an array sorted.
View Problem SolveRange Minimum Query
Find the minimum value in a given range using a segment tree.
View Problem SolveUnion-Find with Path Compression
Implement a union-find data structure with path compression.
View Problem SolveExtended Euclidean Algorithm
Find the modular inverse of a number using the Extended Euclidean Algorithm.
View Problem SolveReverse Linked List II
Reverse a linked list from position left to position right.
View Problem SolveRestore IP Addresses
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
View Problem SolveBinary Tree Inorder Traversal
Given the root of a binary tree, return the inorder traversal of its nodes' values.
View Problem SolveUnique Binary Search Trees II
Generate all structurally unique BSTs that store values 1...n.
View Problem SolveUnique Binary Search Trees
Given n, return the number of structurally unique BSTs which has exactly n nodes of unique values from 1 to n.
View Problem SolveInterleaving String
Given strings s1, s2, and s3, determine if s3 is formed by interleaving s1 and s2.
View Problem SolveValidate Binary Search Tree
Determine if a binary tree is a valid binary search tree (BST).
View Problem SolveRecover Binary Search Tree
Recover a BST where exactly two nodes were swapped by mistake.
View Problem SolveSymmetric Tree
Check if a binary tree is a mirror of itself (symmetric around its center).
View Problem SolveBinary Tree Level Order Traversal
Return the level order traversal of a binary tree's nodes' values.
View Problem SolveBinary Tree Zigzag Level Order Traversal
Return the zigzag level order traversal of a binary tree's nodes' values.
View Problem SolveConstruct Binary Tree from Preorder and Inorder Traversal
Construct a binary tree from its preorder and inorder traversal.
View Problem SolveConstruct Binary Tree from Inorder and Postorder Traversal
Construct a binary tree from its inorder and postorder traversal.
View Problem SolveBinary Tree Level Order Traversal II
Return the bottom-up level order traversal of a binary tree's nodes' values.
View Problem SolveConvert Sorted Array to Binary Search Tree
Convert a sorted array into a height-balanced binary search tree.
View Problem SolveConvert Sorted List to Binary Search Tree
Convert a sorted linked list into a height-balanced binary search tree.
View Problem SolvePath Sum
Determine if a binary tree has a root-to-leaf path with a specified sum.
View Problem SolveFlatten Binary Tree to Linked List
Flatten a binary tree into a linked list in-place.
View Problem SolveDistinct Subsequences
Count the number of distinct subsequences of s that equal t.
View Problem SolvePopulating Next Right Pointers in Each Node
Connect each node with its next right node in a perfect binary tree.
View Problem SolvePopulating Next Right Pointers in Each Node II
Connect each node with its next right node in any binary tree.
View Problem SolveBest Time to Buy and Sell Stock
Find the maximum profit by buying and selling a stock once.
View Problem SolveBest Time to Buy and Sell Stock II
Find the maximum profit by buying and selling stocks multiple times.
View Problem SolveBest Time to Buy and Sell Stock III
Find the maximum profit by completing at most two transactions.
View Problem SolveBinary Tree Maximum Path Sum
Find the maximum path sum between any two nodes in a binary tree.
View Problem SolveValid Palindrome
Determine if a string is a valid palindrome considering only alphanumeric characters.
View Problem SolveWord Ladder II
Find all shortest transformation sequences from beginWord to endWord.
View Problem SolveWord Ladder
Find the shortest transformation sequence length from beginWord to endWord.
View Problem SolveLongest Consecutive Sequence
Find the length of the longest consecutive sequence in an unsorted array.
View Problem SolveSum Root to Leaf Numbers
Calculate the total sum of all root-to-leaf numbers in a binary tree.
View Problem SolvePalindrome Partitioning II
Find the minimum cuts needed for palindrome partitioning of a string.
View Problem SolveGas Station
Determine if you can complete a circular route starting from any gas station.
View Problem SolveWord Break
Determine if a string can be segmented into space-separated dictionary words.
View Problem SolveReorder List
Reorder a linked list by interleaving the first half with the reversed second half.
View Problem SolveCourse Schedule II
Find a valid order to take all courses given their prerequisites.
View Problem SolveAdd and Search Word
Design a data structure that supports adding and searching words with wildcards.
View Problem SolveBasic Calculator
Implement a basic calculator to evaluate arithmetic expressions with parentheses.
View Problem SolveContinuous Subarray Sum
Find if there exists a continuous subarray that sums to a multiple of k.
View Problem SolveCounting Bits
Count the number of 1's in the binary representation of every number from 0 to n.
View Problem SolveSliding Window Maximum
Find the maximum element in each sliding window of size k.
View Problem SolveNim Game
Determine if you can win a game where players take turns removing stones.
View Problem SolveRandom Pick with Weight
Implement a data structure that picks an element with probability proportional to its weight.
View Problem SolveLongest Repeating Substring
Find the longest substring that appears at least twice in a string using suffix arrays.
View Problem SolveMaximum Flow
Find the maximum flow in a flow network using Ford-Fulkerson algorithm.
View Problem SolveTraveling Salesman Problem
Find an approximate solution to the traveling salesman problem using nearest neighbor.
View Problem SolveKMP Pattern Matching
Implement the Knuth-Morris-Pratt pattern matching algorithm.
View Problem SolveNumber of Islands II
Handle dynamic addition of lands and count number of islands in real-time.
View Problem SolveCount Different Palindromic Subsequences
Count the number of different palindromic subsequences in a string.
View Problem SolvePrime Factorization Queries
Efficiently handle multiple prime factorization queries using preprocessing.
View Problem SolveNext Greater Element II
Find the next greater element for each element in a circular array.
View Problem SolveDesign Circular Deque
Implement a circular double-ended queue with all operations in O(1) time.
View Problem SolveFind Median from Data Stream
Design a data structure that can find the median of a stream of numbers.
View Problem SolveMedian of Two Sorted Arrays
Find the median of two sorted arrays in logarithmic time complexity.
View Problem SolveSplit Array Largest Sum
Split an array into m subarrays to minimize the largest sum among them.
View Problem SolveSingle Number II
Find the element that appears only once in an array where every other element appears three times.
View Problem SolveBest Time to Buy and Sell Stock IV
Find the maximum profit with at most k transactions.
View Problem SolveMinimum Cost to Connect Sticks
Connect sticks with minimum cost using a priority queue.
View Problem SolveFind All Duplicates in an Array
Find all duplicates in an array without using extra space.
View Problem SolveLongest Substring with At Most K Distinct Characters
Find the length of the longest substring with at most k distinct characters.
View Problem SolvePalindrome Partitioning III
Partition a string such that every substring is a palindrome with minimum cuts.
View Problem SolveMaximum Length of Repeated Subarray
Find the maximum length of a subarray that appears in both arrays.
View Problem SolveMinimum Window Substring
Find the minimum window in a string that contains all characters of another string.
View Problem SolveLongest Increasing Subsequence
Find the length of the longest increasing subsequence in an array.
View Problem SolveRotate Array II
Rotate an array to the right by k steps, where k is non-negative.
View Problem SolveUnique Paths III
Find the number of unique paths from the top-left to the bottom-right of a grid with obstacles.
View Problem SolveProduct of Array Except Self II
Return an array such that each element is the product of all elements except itself, without using division.
View Problem SolveLongest Palindromic Subsequence
Find the length of the longest palindromic subsequence in a string.
View Problem SolveMinimum Cost to Cut a Stick
Find the minimum cost to cut a stick into pieces of given lengths.
View Problem SolveCourse Schedule III
Find the maximum number of courses you can take given their start and end times.
View Problem SolveFind the Kth Largest Element in an Array
Find the Kth largest element in an unsorted array.
View Problem SolveLongest Repeating Character Replacement
Find the length of the longest substring that can be obtained by replacing at most k characters.
View Problem SolveWord Break II
Given a string and a dictionary, return all possible sentences that can be formed by segmenting the string.
View Problem SolveNumber of Connected Components in an Undirected Graph
Count the number of connected components in a graph.
View Problem SolveFind Minimum in Rotated Sorted Array
Find the minimum element in a rotated sorted array.
View Problem SolveImplement strStr()
Implement the strStr() function to find the first occurrence of a substring in a string.
View Problem SolveLongest Increasing Path in a Matrix
Find the length of the longest increasing path in a matrix.
View Problem SolveContainer With Most Water
Find two lines that together with the x-axis form a container that holds the most water.
View Problem SolveMinimum Add to Make Parentheses Valid
Given a string of parentheses, find the minimum number of parentheses you need to add to make it valid.
View Problem SolveBest Time to Buy and Sell Stock with Cooldown
Find the maximum profit you can achieve with a cooldown period after selling.
View Problem SolveFind All Anagrams in a String
Find all start indices of anagrams of a string in another string.
View Problem SolveLongest Valid Parentheses
Find the length of the longest valid parentheses substring.
View Problem SolveEdit Distance
Find the minimum number of operations required to convert one string into another.
View Problem SolveTwo Sum II - Input Array Is Sorted
Find two numbers such that they add up to a specific target in a sorted array.
View Problem SolveCount Substrings with All Characters at Least K Times
Count the number of substrings where each character appears at least k times.
View Problem SolveMaximum Product of Splitted Binary Tree
Find the maximum product of the sum of two subtrees after splitting a binary tree.
View Problem SolveMinimum Number of Deletions to Make a String Palindrome
Find the minimum number of deletions required to make a string a palindrome.
View Problem SolveLongest Common Substring
Find the length of the longest common substring between two strings.
View Problem SolveFind the Duplicate Number
Find the duplicate number in an array containing n + 1 integers where each integer is between 1 and n.
View Problem SolveMinimum Window Substring II
Find the minimum window substring that contains all characters of another string, allowing duplicates.
View Problem SolveMaximum Length of Repeated Subarray II
Find the maximum length of a repeated subarray in two arrays.
View Problem SolveSubarray Product Less Than K
Find the number of contiguous subarrays where the product of all elements is less than k.
View Problem SolveFind All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclusive that do not appear in this array.
View Problem SolveLongest Palindromic Substring II
Find the longest palindromic substring in a string, allowing for one character to be removed.
View Problem SolveFind the Duplicate Subtree in a Binary Tree
Given a binary tree, find all duplicate subtrees. For each duplicate subtree, return a list of all of its root nodes.
View Problem SolveCourse Schedule IV
Determine if you can finish all courses given their prerequisites, and return the order of courses.
View Problem SolveMinimum Number of Operations to Make a String Palindrome II
Find the minimum number of operations required to make a string a palindrome, allowing for one character to be removed.
View Problem SolveFind the Longest Substring with At Most K Distinct Characters
Given a string, find the length of the longest substring that contains at most K distinct characters.
View Problem SolveMinimum Cost to Merge Stones II
Find the minimum cost to merge stones into a single pile, allowing for a specific number of merges.
View Problem SolveLongest Substring with At Most Two Distinct Characters
Find the length of the longest substring that contains at most two distinct characters.
View Problem SolveFind the Maximum Length of a Repeated Subarray
Find the maximum length of a subarray that appears in both arrays.
View Problem SolveLongest Increasing Subsequence II
Find the length of the longest increasing subsequence in an array, allowing for one character to be removed.
View Problem SolveMinimum Window Substring III
Find the minimum window substring that contains all characters of another string, allowing for duplicates.
View Problem SolveFind the Kth Smallest Element in a Sorted Matrix
Find the Kth smallest element in a sorted matrix.
View Problem SolveMinimum Cost to Cut a Stick II
Find the minimum cost to cut a stick into pieces of given lengths, allowing for a specific number of merges.
View Problem SolveLongest Substring with At Most Three Distinct Characters
Find the length of the longest substring that contains at most three distinct characters.
View Problem SolveFind the Maximum Length of a Repeated Subarray II
Find the maximum length of a repeated subarray in two arrays, allowing for one character to be removed.
View Problem SolveLongest Palindromic Substring III
Find the longest palindromic substring in a string, allowing for one character to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome III
Find the minimum number of operations required to make a string a palindrome, allowing for one character to be removed.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix II
Find the Kth largest element in a sorted matrix.
View Problem SolveLongest Increasing Path in a Matrix II
Find the length of the longest increasing path in a matrix, allowing for one character to be removed.
View Problem SolveMinimum Window Substring IV
Find the minimum window substring that contains all characters of another string, allowing for duplicates.
View Problem SolveFind the Maximum Length of a Repeated Subarray III
Find the maximum length of a repeated subarray in two arrays, allowing for one character to be removed.
View Problem SolveLongest Palindromic Substring IV
Find the longest palindromic substring in a string, allowing for one character to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome IV
Find the minimum number of operations required to make a string a palindrome, allowing for one character to be removed.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix III
Find the Kth largest element in a sorted matrix.
View Problem SolveFind the Longest Substring with At Most Four Distinct Characters
Given a string, find the length of the longest substring that contains at most four distinct characters.
View Problem SolveMinimum Number of Operations to Make a String Palindrome V
Find the minimum number of operations required to make a string a palindrome, allowing for two characters to be removed.
View Problem SolveLongest Common Subsequence II
Find the length of the longest common subsequence between two strings, allowing for one character to be removed from each string.
View Problem SolveFind the Maximum Length of a Repeated Subarray IV
Find the maximum length of a repeated subarray in two arrays, allowing for two characters to be removed.
View Problem SolveLongest Palindromic Substring V
Find the longest palindromic substring in a string, allowing for two characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick III
Find the minimum cost to cut a stick into pieces of given lengths, allowing for two characters to be removed.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix IV
Find the Kth largest element in a sorted matrix, allowing for one character to be removed.
View Problem SolveMinimum Window Substring V
Find the minimum window substring that contains all characters of another string, allowing for two characters to be removed.
View Problem SolveLongest Increasing Path in a Matrix III
Find the length of the longest increasing path in a matrix, allowing for two characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray V
Find the maximum length of a repeated subarray in two arrays, allowing for two characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome VI
Find the minimum number of operations required to make a string a palindrome, allowing for three characters to be removed.
View Problem SolveLongest Common Subsequence III
Find the length of the longest common subsequence between two strings, allowing for two characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix V
Find the Kth largest element in a sorted matrix, allowing for two characters to be removed.
View Problem SolveLongest Palindromic Substring VI
Find the longest palindromic substring in a string, allowing for three characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick IV
Find the minimum cost to cut a stick into pieces of given lengths, allowing for three characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray VI
Find the maximum length of a repeated subarray in two arrays, allowing for three characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome VII
Find the minimum number of operations required to make a string a palindrome, allowing for four characters to be removed.
View Problem SolveLongest Common Subsequence IV
Find the length of the longest common subsequence between two strings, allowing for three characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix VI
Find the Kth largest element in a sorted matrix, allowing for three characters to be removed.
View Problem SolveLongest Palindromic Substring VII
Find the longest palindromic substring in a string, allowing for four characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick V
Find the minimum cost to cut a stick into pieces of given lengths, allowing for four characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray VII
Find the maximum length of a repeated subarray in two arrays, allowing for four characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome VIII
Find the minimum number of operations required to make a string a palindrome, allowing for five characters to be removed.
View Problem SolveLongest Common Subsequence V
Find the length of the longest common subsequence between two strings, allowing for four characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix VII
Find the Kth largest element in a sorted matrix, allowing for four characters to be removed.
View Problem SolveFind the Longest Substring with At Most Five Distinct Characters
Given a string, find the length of the longest substring that contains at most five distinct characters.
View Problem SolveMinimum Number of Operations to Make a String Palindrome IX
Find the minimum number of operations required to make a string a palindrome, allowing for five characters to be removed.
View Problem SolveLongest Common Subsequence VI
Find the length of the longest common subsequence between two strings, allowing for two characters to be removed from each string.
View Problem SolveFind the Maximum Length of a Repeated Subarray VIII
Find the maximum length of a repeated subarray in two arrays, allowing for five characters to be removed.
View Problem SolveLongest Palindromic Substring X
Find the longest palindromic substring in a string, allowing for five characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick VI
Find the minimum cost to cut a stick into pieces of given lengths, allowing for five characters to be removed.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix VIII
Find the Kth largest element in a sorted matrix, allowing for five characters to be removed.
View Problem SolveMinimum Window Substring VI
Find the minimum window substring that contains all characters of another string, allowing for five characters to be removed.
View Problem SolveLongest Increasing Path in a Matrix IV
Find the length of the longest increasing path in a matrix, allowing for five characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray IX
Find the maximum length of a repeated subarray in two arrays, allowing for five characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XI
Find the minimum number of operations required to make a string a palindrome, allowing for six characters to be removed.
View Problem SolveLongest Common Subsequence VII
Find the length of the longest common subsequence between two strings, allowing for five characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix IX
Find the Kth largest element in a sorted matrix, allowing for six characters to be removed.
View Problem SolveLongest Palindromic Substring XII
Find the longest palindromic substring in a string, allowing for six characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick VII
Find the minimum cost to cut a stick into pieces of given lengths, allowing for six characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray X
Find the maximum length of a repeated subarray in two arrays, allowing for six characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XII
Find the minimum number of operations required to make a string a palindrome, allowing for seven characters to be removed.
View Problem SolveLongest Common Subsequence VIII
Find the length of the longest common subsequence between two strings, allowing for six characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix X
Find the Kth largest element in a sorted matrix, allowing for seven characters to be removed.
View Problem SolveLongest Palindromic Substring XIII
Find the longest palindromic substring in a string, allowing for seven characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick VIII
Find the minimum cost to cut a stick into pieces of given lengths, allowing for seven characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray XI
Find the maximum length of a repeated subarray in two arrays, allowing for seven characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XIII
Find the minimum number of operations required to make a string a palindrome, allowing for eight characters to be removed.
View Problem SolveLongest Common Subsequence IX
Find the length of the longest common subsequence between two strings, allowing for seven characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix XI
Find the Kth largest element in a sorted matrix, allowing for eight characters to be removed.
View Problem SolveFind the Longest Substring with At Most Six Distinct Characters
Given a string, find the length of the longest substring that contains at most six distinct characters.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XIV
Find the minimum number of operations required to make a string a palindrome, allowing for six characters to be removed.
View Problem SolveLongest Common Subsequence X
Find the length of the longest common subsequence between two strings, allowing for three characters to be removed from each string.
View Problem SolveFind the Maximum Length of a Repeated Subarray XII
Find the maximum length of a repeated subarray in two arrays, allowing for six characters to be removed.
View Problem SolveLongest Palindromic Substring XV
Find the longest palindromic substring in a string, allowing for six characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick IX
Find the minimum cost to cut a stick into pieces of given lengths, allowing for six characters to be removed.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix XII
Find the Kth largest element in a sorted matrix, allowing for six characters to be removed.
View Problem SolveMinimum Window Substring VII
Find the minimum window substring that contains all characters of another string, allowing for six characters to be removed.
View Problem SolveLongest Increasing Path in a Matrix V
Find the length of the longest increasing path in a matrix, allowing for six characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray XIII
Find the maximum length of a repeated subarray in two arrays, allowing for six characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XV
Find the minimum number of operations required to make a string a palindrome, allowing for seven characters to be removed.
View Problem SolveLongest Common Subsequence XI
Find the length of the longest common subsequence between two strings, allowing for six characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix XIII
Find the Kth largest element in a sorted matrix, allowing for seven characters to be removed.
View Problem SolveLongest Palindromic Substring XVI
Find the longest palindromic substring in a string, allowing for seven characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick X
Find the minimum cost to cut a stick into pieces of given lengths, allowing for seven characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray XIV
Find the maximum length of a repeated subarray in two arrays, allowing for seven characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XVI
Find the minimum number of operations required to make a string a palindrome, allowing for eight characters to be removed.
View Problem SolveLongest Common Subsequence XII
Find the length of the longest common subsequence between two strings, allowing for seven characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix XIV
Find the Kth largest element in a sorted matrix, allowing for eight characters to be removed.
View Problem SolveLongest Palindromic Substring XVII
Find the longest palindromic substring in a string, allowing for eight characters to be removed.
View Problem SolveMinimum Cost to Cut a Stick XI
Find the minimum cost to cut a stick into pieces of given lengths, allowing for eight characters to be removed.
View Problem SolveFind the Maximum Length of a Repeated Subarray XV
Find the maximum length of a repeated subarray in two arrays, allowing for eight characters to be removed.
View Problem SolveMinimum Number of Operations to Make a String Palindrome XVII
Find the minimum number of operations required to make a string a palindrome, allowing for nine characters to be removed.
View Problem SolveLongest Common Subsequence XIII
Find the length of the longest common subsequence between two strings, allowing for eight characters to be removed from each string.
View Problem SolveFind the Kth Largest Element in a Sorted Matrix XV
Find the Kth largest element in a sorted matrix, allowing for nine characters to be removed.
View Problem SolveFind the First Missing Positive
Given an unsorted integer array, find the smallest missing positive integer.
View Problem SolveImplement strStr() III
Implement strStr() to locate a substring within a string, returning the index of the first occurrence.
View Problem SolveCheck if a String is a Palindrome II
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring case.
View Problem SolveRemove Duplicates from Sorted Array III
Given a sorted array, remove duplicates in-place such that each element appears at most three times.
View Problem SolveFind the Sum of All Elements in an Array II
Given an array, find the sum of all its elements.
View Problem SolveFind the Second Smallest Element in an Array
Given an array, find the second smallest element.
View Problem SolveReverse a String II
Write a function that reverses a string. The input string is given as an array of characters.
View Problem SolveFind the Maximum Difference Between Two Elements
Given an array, find the maximum difference between two elements.
View Problem SolveCheck if a String Contains Only Digits
Given a string, check if it contains only digits.
View Problem SolveCount the Number of Words in a String
Given a string, count the number of words in it.
View Problem SolveCheck if a String is a Substring of Another II
Given two strings, check if one is a substring of the other.
View Problem SolveFind the Mode of an Array
Given an array, find the mode (the value that appears most frequently).
View Problem SolveCheck if a String is a Valid Email
Given a string, check if it is a valid email address.
View Problem SolveFind the Unique Element in an Array
Given an array where every element appears twice except for one, find that unique element.
View Problem SolveCount the Number of Consonants in a String
Given a string, count the number of consonants in it.
View Problem Solve