Home > Back-end >  Ask a small problem
Ask a small problem

Time:10-27

This is the first string a, b, f, h and s
The second string is the a, b, c, d, f, g, h, j, s
How to compare the two strings out to take out the characters of different and separated with ", "

CodePudding user response:

No one,,,

CodePudding user response:

Really very worried

CodePudding user response:

CodePudding user response:

Homework? Think about yourself,

CodePudding user response:

Define an integer array of size is 26, corresponding to the 26 letters
At first the elements in the array are initialized to 0, then scan two strings, respectively in each letter of the array elements and add a
Both string after the scanning, value of 0 element in an array, said that the letter had ever seen a value of 1 elements is two different elements in the string, the value of 2 element represents the letter in the two strings are
Scan the array, the output value of 1 elements in turn can
  • Related