标签:ati dde function bsp requests ESS hat nbsp alice
In this challenge, you will create the username portion of a registration system. All usernames must be unique. If a new user requests a name that is already used, an integer should be added to the end of the username to make it unique.
As an example, if username requests were for [bob, alice, bob, alice, bob, alice], your system should assign username bob, alice, bob1, alice1, bob2, alice2
Given a list of username requests in the order given, process all requests and return an array of the username as assigned by your function.
Function Description
Complete the function usernamesSystem in the editor below.
The function must return an array of username in the order desired.
usernamesSystem has the following parameter(s):
an array of username strings in the order required
题意:
思路:
代码:
标签:ati dde function bsp requests ESS hat nbsp alice
原文地址:https://www.cnblogs.com/liuliu5151/p/11513158.html