Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ ZyLab 4.27: Merge and Sort. We are allowed to only use loops/branches and the simple operations, not any vectors. Read two strings that contain

C++ ZyLab 4.27: Merge and Sort.

We are allowed to only use loops/branches and the simple operations, not any vectors. Read two strings that contain only alphabet ('a' through 'z' and 'A' through 'Z'). Merge them based on the ASCII order of the alphabet. Remove all of the duplicated letters. See the example session below.

Read "binarytriangle" and "ANSIStandard" -> "AINSabdegilnrty" Read "RabitRunNING" and "TurTLeSLeepiNG" -> "GILNRSTabeinprtu" Bye... 

This is easily done by concatenating the two strings into one and finding the smallest letter and adding it to a new string until you consume all the letters in the concatenated string. No addition should be made if the letter is already added, i.e., if the letter at the tail of the new string has the same letter found as the smallest at the current round of iteration.

Assimilate the above example. You need the exact same format for grading. The input must be formed like below used for this example. You should not include non-alphabet letter; you should send two strings "quit" and "quit" to terminate program.

binarytriangle ANSIStandard RabitRunNING TurTLeSLeepiNG quit quit 

Please keep in mind, this needs to be solved using C++.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions