You are given two strings containing only lowercase English…
You are given two strings containing only lowercase English letters. Write a function in C++ or using pseudocode that takes as input the two strings and returns a string containing the characters common to both strings in alphabetical order using a set or map data structure (unordered_set, unordered_map, set, or map). You are not allowed to call the set_intersection method that is available in standard libraries. You MUST implement the intersection yourself. Example 1:first string: “dabhieqiad”Second string: “bbxlwqyii”Output: “biiq”Example 2:First string: “kddaaannnnn”Second string: “yyyyydnnnaa”Output: “aadnnn”
Read Details