Question: Please solve the following problem preferably using c++ Your program Write a function called pair contained in the string by iteratively removing all instances of

Please solve the following problem preferably using c++  Please solve the following problem preferably using c++ Your program Write

Your program Write a function called pair contained in the string by iteratively removing all instances of a set of characters until a twisted pair remains. which takes a string argument and returns a twisted If no twisted pair is possible, then the output should be an empty string Note: when removing a character, all instances of that character must be removed. For example, given an input string of "abcabdacdb instances of c' and d', which results in the string "ababab, which is a valid twisted pair which would remove all should return. Input Each line contains an input string to pass into indPair Each input string will be composed of ascii characters only will never contain multiple twisted pairs (ie. input string "ababcdcd", which contains two possible answers: "abab and "cdcd"); each input will contain one and only one rectanswer. should ignore trailing and preceding whitespace Output Your program should produce an output file you can test by uploading here File to upload: Choote Each line should contain... ethe result from passing each corresponding line in the input file to If no twisted pair is possible, print an empty line. Sample Input IK7KK7 7 71 7K KIK: 7KIKKI K7 4/s/INN/4 6661 6m Im61 66m mim661m Output: 4:4:4:4 mimimmimim

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!