Tap here to switch tabs
Problem
Submissions

Problem: Greatest Sum Divisible by Three

Greatest Sum Divisible by Three asks you to choose elements from an integer array and return the largest possible sum whose value is divisible by three.

Statement

Given an integer array nums, return the maximum possible sum of elements chosen from the array such that the sum is divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤4imes104\leq 4 imes 10^4

  • 1≤1 \leq nums[i] ≤104\leq 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Greatest Sum Divisible by Three

Greatest Sum Divisible by Three asks you to choose elements from an integer array and return the largest possible sum whose value is divisible by three.

Statement

Given an integer array nums, return the maximum possible sum of elements chosen from the array such that the sum is divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤4imes104\leq 4 imes 10^4

  • 1≤1 \leq nums[i] ≤104\leq 10^4