Marble Sort
CodeChefOpen on judge ↗
Peter has ‘n’ marbles. Initially the weight of ‘n’ number of marbles is given. For each value of ‘i’, weight[i] is a positive integer. Now, Peter decides to keep atmost two marbles in a new box. The new box of marbles has some constraints that the maximum weight it can hold is ‘k’. And now Peter is confused!! Can u help him to minimize the total number of boxes? ###Input - The First
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.
Sign in to chat with the tutor and save your progress.
Sign in to start