Complete Day Pairs

Count pairs of times (in minutes) whose sum is a multiple of 24 hours (1440 minutes). Use modulo arithmetic with a frequency map to find complementary remainders in O(n).

Examples
Input: [12,12,30,24,24]
Output: 2
Hints

Complete Day Pairs

Count pairs of times (in minutes) whose sum is a multiple of 24 hours (1440 minutes). Use modulo arithmetic with a frequency map to find complementary remainders in O(n).