Tag: array
All the problems with the tag "array".
-
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 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 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 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.