← All problemsSign in

DORA-CAKES

Doraemon likes to fly with his bamboo-copter.But the major problem is that he can fly only at the same height or fly higher but he can't come down. He has a lot of buildings in front of him say N and on the top of every building there is a DORA-CAKE. Knowing his potential of flying he wants to eat maximum DORA-CAKES as he is very fond of them. So given the number of buildings N and height of each

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