Company: Wipro_11nov
Difficulty: medium
User ID Generation Problem Description Joseph's team has been assigned the task of creating user-ids for all participants of an online gaming competition. Joseph has designed a process for generating the user-id using the participant's First_Name, Last_Name, PIN code and a number N. The process defined by Joseph is as below - Step 1 - Compare the lengths of First_Name and Last_Name of the participant. The one that is shorter will be called "Smaller Name" and the one that is longer will be called the "Longer Name". If both First_Name and Last_Name are of equal Length, then the name that appears earlier in alphabetical order will be called "Smaller Name" and the name that appears later in alphabetical order will be called the "Longer Name". Step 2 - The user-id should be generated as below - First Letter of the longer name + Entire word of the smaller name + Digit at position N in the PIN when traversing the PIN from left to right + Digit at position N in the PIN when traversing the PIN