01204212/paren
รุ่นแก้ไขเมื่อ 20:46, 7 กันยายน 2559 โดย Jittat (คุย | มีส่วนร่วม) (หน้าที่ถูกสร้างด้วย ':from 01204212 You have a string consisting of parentheses ( ), curly braces { }, and brackets [ ]. You want to check if they are...')
- from 01204212
You have a string consisting of parentheses ( ), curly braces { }, and brackets [ ]. You want to check if they are properly balanced. The following are examples of balanced strings:
(()())(())((())()) [()[]] {[]}{[][](()[])}
These are unbalanced strings:
)( [[)) [{]} {{{{}}}}}
You want to write a program that performs the balance checking.