Zookal
Zookal

We’d love to hear any feedback or comment from you!

© 2011-2021 Zookal Pty Ltd

View question and answer

From our collection of questions and answers
Engineering · Computer Science
Question details

please read carefully the texts provided 2 images. Then please answer for me especially this 2 questions: 1) try to solve the problem without using maps. can you do it with vectors? how about just sets? 2) after solving #1, compare your codes with the solution using maps. estimate the number of instructions your program will require to run on an input of n strings. Once again i want to remind the person who will answer for me please see 2 attachments with this questions. Basically its all about c++ coding about "Maps/sets".maps. Cpp 1 include Kiost ream 2 using std: cin; 3 using std: cout 4 using std: endl; 5 #include <string 6 using std: string; 7 #include map» also known as an associative array kind 8 using std: map; you can think of maps of like arrays, but the indexes no longer have to be integers e.g., we could do Al a string 100 10 11 12 int main() 13 print a frequency table for the strings we read 14 from stdin. 15 string s; hold input 16 map string, int F; FIs J will store the count for s. 17 while (cin s) FLs1++; 18 NOTE: it is crucial that integers are initialized 19 to 0 here. (Remember integers that arent part of a map 20 re not initialized to O for you. 21 for (map<string, int iterator i F. begin() i F, en i++) 22 cout (*i), first (*i), second NOTE: *i actually has Two parts: the key 23 and the value. the key is stored in (*i) first and the 24 value is in 25 (*i) Second The picture in the notes

Answer
Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.

Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.Find step-by-step answers from expert tutors to questions asked by students like you. Start 14-day free trial.