Build a staircase
CodeChefOpen on judge ↗
Chef wants to build a staircase. He has ordered blocks of different sizes in order to construct it. He was delivered the stairs separately in a jumbled order. He makes trips using a crane to pick up blocks on the way and stack it. He gets two groups of stairs such that, when placed one after another, a full staircase is made. Order of the sizes of blocks is given in an array. Chef has fuel for m
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