-
I'm very curious on this and I would appreciate it if someone could answer my question on this subject, as I don't have the most experience, and I know there's programmers out there who could assist me on my question. thank you if you do decide to help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The idea is to use nested loops: for each character in string s1, check whether it is present in string s2 or not. Likewise, for each character in string s2, check whether it is present in string s1 or not. Create an array check[] of size MAX_CHAR (where MAX_CHAR is set to 26 for lowercase English letters) to flag the already used characters. Store the uncommon characters in a character array or string. Finally, sort the characters in ascending order and print the result. |
Beta Was this translation helpful? Give feedback.
The idea is to use nested loops: for each character in string s1, check whether it is present in string s2 or not. Likewise, for each character in string s2, check whether it is present in string s1 or not. Create an array check[] of size MAX_CHAR (where MAX_CHAR is set to 26 for lowercase English letters) to flag the already used characters. Store the uncommon characters in a character array or string. Finally, sort the characters in ascending order and print the result.