Sobes.tech
Intern — Senior

Validation of the correctness of a bracket string

livecode

Task condition

Given a string consisting solely of the characters '(', ')', '{', '}', '[' and ']'. It is necessary to check whether it forms a correct bracket sequence. The sequence is considered correct when each opening bracket has a corresponding closing bracket of the same type and all brackets are properly nested.