Divisible by 60 Time : Space : 1234567891011int Solution::divisibleBy60(vector<int> &A) { if(A.size() == 1) return A[0] == 0; if(A.size() == 2) return (A[0] == 0 and A[1] == 6) or (A[0] == 6 and A[1] == 0); int sum = 0, zero = 0; for(auto a : A) { if(a == 0) zero = 1; sum += a; } return sum % 3 == 0 and zero;}