# Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. # An input string is valid if: # Open brackets must be closed by the same ...
現在ITエンジニアとして働いていますが、コーディング・アルゴリズム力をもっと鍛えたいと思い、LeetCodeで学んだ内容をメモ的にアウトプットしています。 また、海外や外資のコーディングテスト対策としてもLeetCodeは有用らしく、海外でのキャリアに ...
1. Check a bracket (b) in the string (s), if it contains in parentheses dictionary then we add to stack it's opposite bracket. 2. If bracket not in parentheses we check does it mach with last bracket ...