Check if string B can be formed using letters from string A, where each letter in A can be used at most once.
Examples
Example 1
Input: A = "aab", B = "ab"
Output: true
Can use 1 'a' and 1 'b' from A to form B
Example 2
Input: A = "ab", B = "aab"
Output: false
Need 2 'a's but A only has 1 'a'
Constraints
- Both strings can be empty
- Case-sensitive matching