Company: Swiggy
Difficulty: medium
\n Diverse Deputations \n \n \n A professional society is using a program to determine possible diverse deputations of 3 members for an upcoming conference. There are m men and w women who are eligible. A deputation is diverse only if it contains at least one man and at least one woman. Two deputations are considered distinct if one has a member that the other does not. For a given number of men and women, determine the number of distinct ways to select a diverse deputation of 3 people. \n \n \n \n Example \n m = 1 \n w = 2 \n There is m = 1 man available and there are w = 2 women. Label them m1, w1, w2 for demonstration. There are 2 possible ways to form a diverse deputation (m1, w1, w2) and (m1, w2, w1). The only other possible permutation is (w1, w2, w2), which does not include a man, so it is invalid. \n \n \n \n Function Description \n Complete the function diverseDeputation in the editor below. \n \n diverseDeputation has the following parameters: \n \n int m : the number of men