0383 Ransom Note
Solved at: 230128
Question
Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise.
Each letter in magazine can only be used once in ransomNote.
Solution
Results
- Runtime 511 ms. Beats 5.8%
- Memory 14.5 MB. Beats 61.68%
Complexity Analysis
Time: Space: -- we can say this because there are only 26 possible keys
Takeaways
Dictionary with finite set of key possible is
Backlinks (1)
Comments (0)