Page 1 of 1

Problem Statement You are given two numbers x and y represented as strings. y is generated by random shuffling x and the

Posted: Sun Jul 10, 2022 11:26 am
by answerhappygod
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 1
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 1 (68.69 KiB) Viewed 49 times
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 2
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 2 (68.69 KiB) Viewed 49 times
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 3
Problem Statement You Are Given Two Numbers X And Y Represented As Strings Y Is Generated By Random Shuffling X And The 3 (44.97 KiB) Viewed 49 times
Problem Statement You are given two numbers x and y represented as strings. y is generated by random shuffling x and then adding 0 to n more digits at any random positions. Create a function that takes in these two numbers (x and y) as string inputs and returns the newly inserted digit(s) that was/were added to y in the form of a concatenated string of all the newly added digit(s) in an ascending order. You must use a set or map data structure from STL to solve the problem. Note: A single digit can be added more than once in the new number. Constraints x and y > 0 0 < x.length, y.length <= 10^8 y.length x.length Example 1 Input: 8 56981234 Output: 1234569 Example 2 Input: 1234 12345 Output: 5 4 Explanation The sample input consists of two strings separated by a space and the sample output consists of the newly inserted digit(s) that was/were added to the shuffled first string in an ascending order. Problem Attributes
Solution 1 2 3 45678 #include <iostream> #include <string> #include <algorithm> std::string findTheDigits (std::string x, std::string y) { // Write your code here return ""; } Stdin Compiler Output 1234 12345 Submission