## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## [Solution] Equal Strings CodeChef Solution | CodeChef Problem Solution 2022

Given a string $A$ of length $N$ consisting of lowercase English alphabet letters.

You are allowed to perform the following operation on the string $A$ any number of times:

• Select a non-empty subsequence $S$ of the array $\left[1,2,3,\dots ,N\right]$ and any lowercase English alphabet $\alpha$;
• Change ${A}_{i}$ to $\alpha$ for all $i\in S$.

Find the minimum number of operations required to convert $A$ into a given string $B$ of

length $N$ consisting of lowercase English alphabet letters.

### Input Format

• The first line of input contains a single integer $T$, denoting the number of test cases. The description of $T$ test cases follow.
• The first line of each test case contains an integer $N$ - the length of the string $A$ and $B$.

• The second line of each test case contains the string $A$.
• The third line of each test case contains the string $B$.

### Output Format

For each test case, output the minimum number of operations required to convert string $A$ into string $B$.