← All problemsSign in

Build, build, build

Problem Statement Jett has n logs of wood in her cabin. She gives Sage a task which is to build a pyramid from those logs by stacking them upon each other. The smallest unit consists of two logs leaned towards each other. Also a log is placed horizontally on top of two adjacent units. Jett asks Sage to build the pyramid with maximum height possible by using the n logs of wood. Sage is busy play

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