Leetcode 3185. Count Pairs That Form a Complete Day II
Count the number of index pairs (i < j) whose hours sum to a multiple of 24 — equivalently, whose values' remainders mod 24 complement to 24 (or 0). With n up to 5e5 and large values, this is a remainder-frequency pairing problem requiring an O(n) solution.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.