Rohit and CakeWalk
CodeChefOpen on judge ↗
Problem Description Rohit loves to eat and he has reached a magical cake shop. The magical cake shop has several cakes arranged in a line. Consider that there are n cakes placed in a line and each cake has a fixed weight, i.e weight of the ith cake is wt[i]. Rohit loves eating and he wants to eat as much "total weight of cakes" as possible. But this cake shop is a magical cake shop. Everytime R
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