@@ -0,0 +1,845 @@
+/**%0A * Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; otherwise, it will return false.%0A *%0A *Each letter in the magazine string can only be used once in your ransom note.%0A *%0A *Note:%0A *You may assume that both strings contain only lowercase letters.%0A */%0Aclass Solution %7B%0A    public boolean canConstruct(String ransomNote, String magazine) %7B%0A        int%5B%5D map = new int%5B26%5D;%0A        for (char mz : magazine.toCharArray()) %7B%0A            map%5Bmz - 'a'%5D++;%0A        %7D%0A        %0A        for (char rs : ransomNote.toCharArray()) %7B%0A            if (map%5Brs - 'a'%5D %3E 0) %7B%0A                map%5Brs - 'a'%5D--;%0A            %7D else %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create RansomNote.java