πRust ownership and borrowing
Rust Ownership and Borrowing Practice with HashMap and Vec
Problem Description
Example 1
Input: ransomNote = "a", magazine = "b"
Output: falseExample 2
Input: ransomNote = "aa", magazine = "ab"
Output: falseExample 3
Input: ransomNote = "aa", magazine = "aab"
Output: trueConstraints
Solutions
Solution with Vec
Solution with HashMap
Conclusion
Last updated