Tag: arrays
All the problems with the tag "arrays".
-
LeetCode 36 - Valid Sudoku
Determine if a 9x9 Sudoku board is valid based on specific rules for rows, columns, and 3x3 sub-boxes.
-
Leetcode 11 - Container With Most Water
Given an array of integers representing the height of vertical lines, find the maximum amount of water a container formed by these lines can store.
-
Leetcode 15 - 3Sum
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. The solution set must not contain duplicate triplets.
-
Leetcode 153 - Find Minimum in Rotated Sorted Array
Given a sorted rotated array of unique elements, return the minimum element of this array.
-
Leetcode 152 - Maximum Product Subarray
Given an integer array nums, find a subarray that has the largest product, and return the product.
-
Leetcode 217 - Contains Duplicate
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.
-
Leetcode 53 - Maximum Subarray
Given an integer array nums, find the subarray with the largest sum and return its sum.
-
Leetcode 121 - Best Time to Buy and Sell Stock
You want to maximize your profit by choosing a single day to buy one stock and a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction.
-
Leetcode 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 nums except nums[i].
-
Leetcode 167 - Two Sum II
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
-
Leetcode 1 - Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.