Problems
All the problems
-
Leetcode 2781 - Length of the Longest Valid Substring
Given a string and an array of forbidden substrings, find the length of the longest valid substring of the string.
-
Leetcode 1567 - Maximum Length of Subarray With Positive Product
Given an array of integers, find the maximum length of a subarray where the product of all its elements is positive.
-
Leetcode 42 - Trapping Rain Water
Given an elevation map, compute how much water it can trap after raining.
-
LeetCode 1492 - The kth Factor of n
Find the kth factor of a given integer n in ascending order, considering optimal solutions for performance.
-
LeetCode 125 - Valid Palindrome
Determine if a given string is a palindrome, considering only alphanumeric characters and ignoring cases.
-
Leetcode 271 - Encode and Decode Strings
Design an algorithm to encode a list of strings into a single string and decode it back to the list, working with any set of characters.
-
Leetcode 167 - Two Sum II - Input Array Is Sorted
Given a sorted array, find two numbers such that they add up to a specific target number, and return their indices.
-
LeetCode 36 - Valid Sudoku
Determine if a 9x9 Sudoku board is valid based on specific rules for rows, columns, and 3x3 sub-boxes.
-
Leetcode 435 - Non-overlapping Intervals
Given an array of intervals, find the minimum number of intervals to remove to make the rest non-overlapping.
-
Leetcode 128 - Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence with an O(n) time complexity algorithm.
-
LeetCode 1431 - Kids With the Greatest Number of Candies
Determine if each child can have the greatest number of candies after giving them extra candies.
-
LeetCode 2405 - Optimal Partition of String
Given a string, partition it into substrings such that each substring contains unique characters. Find the minimum number of such substrings.
-
Leetcode 347 - Top K Frequent Elements
Given an integer array and an integer k, find the k most frequent elements in the array.
-
Leetcode 56 - Merge Intervals
Given an array of intervals, merge all overlapping intervals and return the non-overlapping intervals that cover the entire range.
-
Leetcode 57 - Insert Interval
Insert a new interval into a sorted array of non-overlapping intervals, merging overlapping intervals if necessary.