注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 匿名 于 2023-10-14 13:47 编辑
投的是 Senior Software Engineer, Back End
四題 70 分鐘 code signal
1.- Given a starting score and an array of changes, return
- 'beginner' if score < 1500,
- 'intermediate' if 1500 < score < 2000,
- 'advance' if 2000 < score < 2500,
- 'pro' if score > 2500
- Ex:
- start = 1500, changes=[100, 200, -500]
- return 'beginner'
复制代码 2.- Given a list of integers, return True, if you can perform cyclic shift t times on the list to get a decreasing array, return -1 if there is no such solution.
- Note, you are not expected to give an optimal solution, O(n^2) will be fine
- EX:
- arr=[3,2,1,5,4] return True
复制代码 3.- Given a group of member, and a list of messages, find out how many time each member is mentioned in the message. output from the most mention member to the least. Mentions can be @userid or @userid1,userid2,userid3.
- Note, if a member mentioned twice in one single message, only count once.
- EX:
- members:["id123", "id321", "id700", "id8"], messages: [ "hi @id123,id321,id800 please check this issue. @id123 what do you think the issue is?", "@id123 great job! nice appro@ch!"]
- return ["id123=2", "id321=1", "id700=0", "id8=0"]
复制代码 4.
除了最後一題會 TLE 所以花比較多時間 optimize 其它都一次 pass (1200/1200)
週六做的題,週一就收到 HR 電話通知安排 powerday
新人第一次發面經,求加點大米 |