Array Problems

Master arrays by solving these carefully selected problems

Problems

1752. Check if Array Is Sorted and Rotated
Given an array `nums`, return `true` if the array was originally sorted in non-decreasing order, then rotated some number of positions (including zero). Otherwise, return `false`.
Easy
53. Maximum Subarray
Given an integer array `nums`, find the subarray with the largest sum, and return its sum.
Medium
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`.
Easy
121. Best Time to Buy and Sell Stock
You are given an array `prices` where `prices[i]` is the price of a given stock on the `ith` day.
Easy
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]`.
Medium