Retired

Braces status (retired)

53 of 547bestwebua

Description:

Write a function that checks the braces status in a string, and return True if all braces are properly closed, or False otherwise. Available types of brackets: (), [], {}.

Please note, you need to write this function without using regex!

Examples

'([[some](){text}here]...)'  =>  true
'{([])}'                     =>  true
'()[]{}()'                   =>  true
'(...[]...{(..())}[abc]())'  =>  true
'1239(df){'                  =>  false
'[()])'                      =>  false
')12[x]34('                  =>  false
"([[some](){text}here]...)"  =>  true
"{([])}"                     =>  true
"()[]{}()"                   =>  true
"(...[]...{(..())}[abc]())"  =>  true
"1239(df){"                  =>  false
"[()])"                      =>  false
")12[x]34("                  =>  false
"([[some](){text}here]...)"  =>  true
"{([])}"                     =>  true
"()[]{}()"                   =>  true
"(...[]...{(..())}[abc]())"  =>  true
"1239(df){"                  =>  false
"[()])"                      =>  false
")12[x]34("                  =>  false
'([[some](){text}here]...)'  =>  True
'{([])}'                     =>  True
'()[]{}()'                   =>  True
'(...[]...{(..())}[abc]())'  =>  True
'1239(df){'                  =>  False
'[()])'                      =>  False
')12[x]34('                  =>  False

Don't forget to rate this kata! Thanks :)

Algorithms
Fundamentals
Logic
Arrays
Data Types
Loops
Control Flow
Basic Language Features
Regular Expressions
Declarative Programming
Advanced Language Features
Programming Paradigms
Strings

Stats:

CreatedFeb 6, 2017
Warriors Trained1272
Total Skips70
Total Code Submissions2843
Total Times Completed547
Ruby Completions53
JavaScript Completions259
Python Completions256
Crystal Completions3
Total Stars26
% of votes with a positive feedback rating87% of 218
Total "Very Satisfied" Votes180
Total "Somewhat Satisfied" Votes20
Total "Not Satisfied" Votes18
Total Rank Assessments72
Average Assessed Rank
6 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • bestwebua Avatar
  • GiacomoSorbi Avatar
  • anter69 Avatar
  • e.mihaylin Avatar
  • FArekkusu Avatar
Ad