Question: Question: Find Password: Detective Buckshee Junior has been approached by the shantiniketan kids society for help in finding the password to the games complex.

Question: Find Password: Detective Buckshee Junior has been approached by the shantiniketan


Question: Find Password: Detective Buckshee Junior has been approached by the shantiniketan kids society for help in finding the password to the games complex. After hearing the scenario, detective Buckshee Junior realises that he will need a programmer's support. He contacts you and requests your help. Please help the detective by writing a function to generate the password. The scenario is as below - Five numbers are available with the kids. These numbers are either stable or unstable. A number is stable if each of its digit occur the same number of times, i.e. the frequency of each digit in the number is the same. For e.g. 2277, 4004, 11, 23, 583835, 1010 are examples of stable numbers. Similarly, A number is unstable if the frequency of each digit in the number is NOT the same. For e.g. 221, 4314, 101, 233, 58135, 101 are examples of unstable numbers.. The password can be found as below - i.e. password = Maximum of all stable numbers - Minimum of all Unstable numbers Assuming that the five numbers are passed to a function as input1, input2, input3, input4 and input5, complete the function to find and return the password. For Example: If input1 = 12, input2 = 1313, input3 = 122, input4 = 678, and input5 = 898, stable numbers are 12, 1313 and 678 unstable numbers are 122 and 898 So, the password should be = Maximum of all stable numbers - Minimum of all Unstable numbers = 1313-122 = 1191

Step by Step Solution

3.33 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed ... View full answer

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 Programming Questions!