Skip to content

Latest commit

 

History

History

check-brackets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Write a function that checks characters(brackets) in input string and looks for its correspondence. If the number of opening and closing character is the same, then it returns true. Otherwise - false.


Input: checkBrackets("(())") Output: true

Input: checkBrackets("(()") Output: false


Write a function that checks all kinds of brackets(*)


Input: checkAllBrackets("({[]})") Output: true

Input: checkAllBrackets("()[]{") Output: false