NeetCode #370LC-962MediumStack
← Back to All Problems#370 · #962 · Maximum Width Ramp(最大宽度坡)
📌 Problem Statement & Constraints
A ramp is a pair
(i, j) with i < j and nums[i] <= nums[j]. The width is j - i. Given an array nums, return the maximum width of a ramp, or 0 if none exists. Constraints: 2 <= nums.length <= 5 * 10^4, 0 <= nums[i] <= 5 * 10^4.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!