NeetCode #144LC-2610MediumArrays & Hashing
← Back to All Problems#144 · #2610 · Convert an Array Into a 2D Array With Conditions(转换二维数组)
📌 Problem Statement & Constraints
You are given an integer array
nums. Create a 2D array where the i-th row contains the i-th occurrence of each distinct value, and pad shorter rows with zeros so the array is rectangular. Constraints: 1 <= nums.length <= 200, 1 <= nums[i] <= nums.length.🔒
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!