- 0 1 Matrix
Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.
- 1004. Max Consecutive Ones III
Given a binary array nums and an integer k, return the maximum number of consecutive 1's in the array if you can flip at
- 1679. Max Number of K Sum Pairs
You are given an integer array nums and an integer k.
- 238. Product of Array Except Self
Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of n
- 283. Move Zeroes
Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements
- 3 Sum
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, a
- 724. Find Pivot Index
Given an array of integers nums, calculate the pivot index of this array.
- Capacity To Ship Packages Within D Days
A conveyor belt has packages that must be shipped from one port to another within daysdays.
- Find Minimum in Rotated Sorted Array
Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [
- Find Peak Element
A peak element is an element that is strictly greater than its neighbors.
- Find the nth Root
Understanding the Problem:
- First Bad Version
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of yo
- First and Last Position Of An Element In A Sorted Array
Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target
- K Sum
Given an array nums of n integers, return an array of all the unique quadruplets[nums[a], nums[b], nums[c], nums[d]] suc
- Koko Eating Bananas
Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and wil
- Kth Smallest Number in Multiplication Table
Nearly everyone has used the Multiplication Table. The multiplication table of size m x n is an integer matrix matwhere
- Maximum Points You Can Obtain from Cards
There are several cards arranged in a row, and each card has an associated number of points. The points are given in the
- Maximum Subarray
Given an integer array nums, find the subarray with the largest sum, and return its sum.
- Merge Intervals
Given an array of intervals where intervals[i] = \[starti, endi\], merge all overlapping intervals, and return an array
- Minimum Number of Days to Make m Bouquets
You are given an integer array bloomDay, an integer m and an integer k.
- Minimum Size Subarray Sum
Given an array of positive integers nums and a positive integer target, return the minimal length of a
- Minimum consecutive cards to pick
You are given an integer array cards where cards[i] represents the value of the ith card. A pair of cards are matching i
- Minimum in rotated sorted array II
Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [
- Number of Sub arrays of Size K and Average Greater than or Equal to Threshold
Given an array of integers arr and two integers k and threshold, return the number of sub-arrays of size k and average g
- Search Insert Position
Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return th
- Search in Rotated Sorted Array
There is an integer array nums sorted in ascending order (with distinct values).
- Search in Rotated Sorted Array II
There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values).
- Single Element in a Sorted Array
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one eleme
- Split Array Largest Sum
Given an integer array nums and an integer k, split nums into k non-empty subarrays such that the largest sum of any sub
- Sqrt(x)
Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer sh
- Two Sum 2 Input array is sorted
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that t
More in this folder
- First Bad Version [Easy]
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of yo