← All problemsSign in

Coins

You have been provided with a lots of coins arranged on a table. Some of them are showing Heads(H) and some Tails(T). For a neat arrangement, all coins should show either Heads or Tails.Your job is to find out the minimum number of steps to make the arrangement neat. In one step you can flip any segment of consecutive coins. After flipping a segment, all coins pointing Heads will point Tails or v

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