Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please give answers in C++. We are recommended to use maps or multiple sets to solve this. It is preferable the answer be solved with

image text in transcribed

Please give answers in C++. We are recommended to use maps or multiple sets to solve this. It is preferable the answer be solved with maps and sets, but it is not necessary.

MemberCheck Highest grade: Editor Submitted Versions #include #include 1 2 3 4 5 6 7 8 9 vector whos_dishonest(vector &clubi, vector &club2, vector &clubs) { // fill in code here Problem Statement A health club chain allows its members to visit any of its many health club locations an unlimited number of times per day. The only constraining rule is, a customer can only visit one health club location per day, even though he or she may return to that location an unlimited number of times for the rest of that day, Although the honor system has always worked quite well, the club wants to run some tests to see how many people really follow the rules. You are to write a program that takes the entrance log files from three different clubs (all logging the same day) and return a sorted list of the people who are not honest and went to more than one health club location in the same day. The log files are represented as vector 's where each element is the member name of a customer who entered that day. For example, If a customer showed up three times to one of the club locations that day, the member's name would appear three times in the corresponding vector Notes club1, club, and club3 may contain a different number of elements. The same member name can appear multiple times in a single log file. The elements of the returned ve ctor should be distinct and sorted in lexicographic order (the order they would appear in a dictionary). Assume that two people with the same name are in fact the same person. Constraints clubi, club2, and club3 each have between 1 and 50 elements, Inclusive. Each element of clubi, club2, and club contains between 1 and 50 characters, inclusive. Each element of clubl, club2, and clubs consists only of uppercase letters ('A'-'Z'). Examples 1. {"JOHN","JOHN", "FRED", "PEG"} {"PEG", "GEORGE"} {"GEORGE","DAVID") Returns: { "GEORGE", "PEG" } "PEG" went to club1 and club2, and "GEORGE" went to club2 and clubs. Submit

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

list the characteristics of technical writing?

Answered: 1 week ago

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago