Circle Break
CodeChefOpen on judge ↗
There are N cells in a circle numbered 1 to N in that order. Cell i is adjacent to cells (i-1) and (i+1) and cells 1 and N are also adjacent. You can cut the circle between two indices and you have to make two such cuts so that the circle breaks in to two arcs, with each cell in one of them. Each arc should have at least one cell in it. Given a circular array of N cells, find the number of ways i
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