Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NEED C++ CODE TO SOLVE THESE THREE PROBLEMS PLEASE! ONLY USING !!! same_gmail Create a function sane_gnail that takes 2 input parameters g1 and g2,

NEED C++ CODE TO SOLVE THESE THREE PROBLEMS PLEASE! ONLY USING !!!

image text in transcribed

same_gmail Create a function sane_gnail that takes 2 input parameters g1 and g2, which are 2 valid gmail addresses. The function will return true if both addresses map to the same gmail address and false otherwise. According to gmail: . addresses are not case sensitive . dots don't matter, any+before the e and all characters after the+and before the are ignored For example, "csc...2.1.2ggmail.com", "csc212ggmail.com","CSC.212.ggnail.com, "CSC212 GMail.Com", "csc212+announceggmail.con", "cSC.212+spring 2817egnail.com" are all the same, i.e. if e-mails are sent to those addresses, they will reach the same gmail account. bool same-gna i i (const char g1, const char g2); unique_letters Create a function unique_letters that returns the number of unique letters in an input string. The input to your function is the string s. You can assume this function is not case sensitive. unsigned int unique_letters(const char S) n inversions A company named 212-flix wants to create a similarity measure to find people with similar taste for movies in a large database. Assuming a ranking of n ranking of Q, For example, if n 5 and the ranking for Q is [2, 1, 3, 5, 4]), then the distance to P is 2, because there are two inversions, or out-of-order pairs, (2,1) and (5,4). Create a function n_inversions that counts the number of inversions in an input array of integers. The input to your function is an array of integers A and the number of elements in the array e<>

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 Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

Students also viewed these Databases questions

Question

What are the A1, A3 and Acm lines?

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago