← All problemsSign in

Raman and The Bucket Challenge

Raman and Himanshu are good friends. One day, Himanshu gave him a problem. There are infinite number of buckets and N litres of water. These buckets have a unique property. The capacity of ith bucket is i litres i.e. the capacity of first bucket is 1 litre, the capacity of second bucket is 2 litres and so on. Also, the ith bucket can only be filled when all the buckets which have lesser capacity

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