All Posts
Leetcode 17: Letter Combinations of a Phone Number
Given a string of digits, return all possible letter combinations that the digits could represent based on the phone’s number-to-letter mapping.
Leetcode 20: Valid Parentheses
You are given a string containing characters representing various types of brackets: ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’. Your task is to determine if the input string is valid. A string is considered valid if:
- Open brackets must be closed by the same type of brackets.
- Open brackets must be closed in the correct order.
- Every close bracket has a corresponding open bracket of the same type.