← All problemsSign in

Bamboo Rectangles

Rahul, an algo-geek, went to Mizoram for a trip. There, while he was seeing the traditional dance with bamboos (Cheraw dance), he began thinking about algorithms (after all, he is an algo-geek!). He began wondering that given x and y co-ordinates of bottoms of a certain number of bamboo sticks of a particular length, with the sticks on x-axis placed vertically (parallel to the y-axis) and the stic

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