Company: Wipro_11nov
Difficulty: medium
User ID Generation Problem Joseph's team has to create a user-id for every participant of an online gaming competition. A participant is described by a First_Name , a Last_Name , a numeric PIN and a number N , and Joseph's process turns those four values into one user-id. Step 1. Compare the lengths of First_Name and Last_Name. The shorter one is the Smaller Name and the longer one is the Longer Name . If the two names have the same length, the one that comes earlier in alphabetical order is the Smaller Name and the other is the Longer Name. Step 2. Build the user-id as first letter of the Longer Name + the whole Smaller Name + the digit at position N of the PIN counted from the left + the digit at position N of the PIN counted from the right Both digit positions are 1-based. Step 3. Toggle the letters of the string built in Step 2: every upper-case letter becomes lower-case and every lower-case letter becomes upper-case. Digits are left unchanged. Print the resulting user-id. Alphabet