The Red Green Sticks
CodeChefOpen on judge ↗
In the tech fest of JEC a game was organized for fun. You are participating in that game .In the game you are given $k$ sticks of red color and $k$ sticks of green color. you have to arrange these sticks linearly to form stack but with a condition. * for every red stick there should be a corresponding green stick before it , it will be called a valid pair of sticks if it satisfies another cond
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