You are given two strings of the same length s and t. In one step you can choose any character of t and replace it with another character.

Return the minimum number of steps to make t an anagram of s.

An Anagram of a string is a string that contains the same characters with a different (or the same) ordering.

&nbsp;
Example 1:

Input: s = "bab", t = "aba"
Output: 1
Explanation: Replace the first 'a' in t with b, t = "bba" which is anagram of s.


Example 2:

Input: s = "leetcode", t = "practice"
Output: 5
Explanation: Replace 'p', 'r', 'a', 'i' and 'c' from t with proper characters to make t anagram of s.


Example 3:

Input: s = "anagram", t = "mangaar"
Output: 0
Explanation: "anagram" and "mangaar" are anagrams. 


&nbsp;
Constraints:


	1 &lt;= s.length &lt;= 5 * 104
	s.length == t.length
	s and t consist of lowercase English letters only.


class Solution:
    def minSteps(self, s: str, t: str) -> int:
        for ch in s:
		    # Find and replace only one occurence of this character in t
            t = t.replace(ch, '', 1)
            
        return len(t)
//find the frequency of every letter and check diffrence between the frequency of each letter then divide it by 2 to calculate the minimum number of letter to be changed.
class Solution {
    public int minSteps(String s, String t) {
        int sf[]=new int[26];
        int tf[]=new int[26];
        int diff=0;
        for(char c:s.toCharArray()){
            sf[c-'a']++;
        }
        for(char c:t.toCharArray()){
            tf[c-'a']++;
        }
        for(int i=0;i<26;i++){
            diff+=(int)Math.abs(sf[i]-tf[i]);
        }
        return diff/2;
    }
}
class Solution {
public:
    int minSteps(string s, string t) {
        int count = 0, length = s.length();
        vector<int> vec1(26, 0), vec2(26, 0);
        for(int i = 0; i < length; ++i){
            vec1[s[i] - 'a']++;
            vec2[t[i] - 'a']++;
        }
        for(int i = 0; i < 26; ++i){
            if(vec1[i] > vec2[i])
                count += vec1[i] - vec2[i];
        }
        return count;
    }
};
var minSteps = function(s, t) {

    let hash1 = hash(s);
    let hash2 = hash(t);
    let steps = 0;

    for(let key of Object.keys(hash1)) {
        if( hash2[key]) {
            hash1[key] = hash1[key] - hash2[key];
        }
        if( hash1[key] > 0 ) {
            steps += hash1[key];
        }
    }

    return steps;
};

function hash(str) {
    let hash = {};
    for(let i=0; i<str.length; i++) {
        let letter = str[i];
        if( hash[letter] ) {
            hash[letter]++;
        } else {
            hash[letter] = 1;
        }
    }

    return hash;
}
Minimum Number of Steps to Make Two Strings Anagram