#C136. Unique Characters Extraction
Unique Characters Extraction
Unique Characters Extraction
Given two input strings, write a program that finds all unique characters present in both strings (i.e., the union of the characters from the two strings) and outputs these characters in sorted order. The characters should be sorted in ascending order according to their ASCII values. For example, if the inputs are hello
and world
, the result should be dehlorw
.
Note: All characters including letters, digits, and symbols are considered.
inputFormat
The input consists of two lines taken from standard input. Each line contains one string which may include alphabets, digits, and special characters.
outputFormat
Output a single line to standard output containing the sorted unique characters from the union of the two input strings.
## samplehello
world
dehlorw