Question: in c++ Write a function int mm_score(string k, string g, int &b, int &w) where k is the secret key g is the guess b

in c++

Write a function

int mm_score(string k, string g, int &b, int &w)

where k is the secret key g is the guess b is the number of black points (to be set by your function) w is the number of white points (to be set by your function) and returns 1 if the lengths k,g>0 and equal, otherwise returns 0 and b,w are ignored

File you must submit: soln_func.cc

Examples:

k=111 g=111 b=3 w=0
k=abcd g=dcba b=0 w=4
k=abcde g=edcba b=1 w=4
k=xxxyy g=xyzbx b=1 w=2

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!