← All problemsSign in

Mock Turtle

CodeChefRating 2868Open on judge ↗

The Mock Turtle went to the ocean's school to become a true turtle! However instead of practicing the usual operations of addition, subtraction and division taught by the lecturers, she was always playing with parentheses. A parentheses is defined using the following rules: - An empty string is a parentheses. - If X is a parentheses, then (X) is also a parentheses - If X and Y are parentheses,

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