public boolean areAnagrams(String s1, String s2){
        Map<Character, Integer> characterIntegerMap = new HashMap<Character, Integer>();
        for(int i=0; i<s1.length(); i++){
            if(characterIntegerMap.containsKey(s1.charAt(i))){
                characterIntegerMap.put(s1.charAt(i), characterIntegerMap.get(s1.charAt(i))+1);
            }
            else{
                characterIntegerMap.put(s1.charAt((i)), 1);
            }
        }
        for(int j=0; j<s2.length(); j++){
            if(!characterIntegerMap.containsKey(s2.charAt(j))){
                return false;
            }
            if(characterIntegerMap.get(s2.charAt(j))==0){
                return false;
            }
            characterIntegerMap.put(s2.charAt(j), characterIntegerMap.get(s2.charAt(j))-1);
        }
        return true;
    }