SKYFLOW Hiring Off-Campus OA (2025) | Problem Count Pairs That Form a Complete Day

Question · Posted Jun 2026

Problem Statement You are given an integer array hours where hours[i] represents the duration of a task in hours. A pair of indices (i, j) is said to form a complete day if: i < j and (hours[i] + hours[j]) % 24 == 0 In other words, the total hours of the two tasks should be divisible by 24. Return the total number of such pairs. Input Format Integer array hours Example 1 Input hours = [12,12,30,24,24] Output 2 Explanation ...

The full answer & interview discussion are available to premium members.

Log in Create a free account