-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
斗鱼面试题 #35
Comments
|
|
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
function lottery(whiteList, participant){}
whiteList:类型字符串数组,意义是表示从其他系统中计算出来的活跃用户,如果这批用户参与抽奖,则必定让他中奖。长度不超过1万
participant:类型字符串数组,意义是表示此次活动中真正参与抽奖的用户,长度约是10万。
函数希望从participant返回 2 万个用户,表示中奖用户,优先选取whiteList上的用户,若不在whiteList上,对participant 剩余的随机选取即可。
The text was updated successfully, but these errors were encountered: