← All problemsSign in

2358. Maximum Number of Groups Entering a Competition

LeetCodeArrayMathBinary SearchGreedyOpen on judge ↗

You are given a positive integer array grades which represents the grades of students in a university. You would like to enter all these students into a competition in ordered non-empty groups, such that the ordering meets the following conditions: - The sum of the grades of students in the ith group is less than the sum of the grades of students in the (i + 1)th group, for all groups (except the

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start