NeetCode #112LC-974MediumArrays & Hashing
← Back to All Problems#112 · #974 · Subarray Sums Divisible by K(和可被 K 整除的子数组)
📌 Problem Statement & Constraints
Given an integer array
nums and an integer k, return the number of non-empty subarrays whose sum is divisible by k. Constraints: 1 <= nums.length <= 2 * 10^4, -10^4 <= nums[i] <= 10^4, 2 <= k <= 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!