回复: 2
跳转到指定楼层
上一主题 下一主题
收起左侧

stripe电面面经

全局:

2022(10-12月) 码农类General 硕士 全职@stripe - 网上海投 - 技术电面  | 😐 Neutral 😐 Average | Other | 在职跳槽

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
题目是customer在store里面,跟server removal penalty是基本一样的
写完了part 3,自己写了test,面试官还给了他准备的test,都测试过了,但是现在还没有收到update,我看大家说一般都回复的很快,我觉得那我可能挂了
求让自己过到下一轮!求米!谢谢大家
# For the purposes of this interview, imagine that we own a store. This
# store doesn't always have customers shopping: there might be some long
# stretches of time where no customers enter the store. We've asked our
# employees to write simple notes to keep track of when customers are
# shopping and when they aren't by simply writing a single letter every
# hour: 'Y' if there were customers during that hour, 'N' if the store
# was empty during that hour.
# For example, our employee might have written "Y Y N Y", which means
# the store was open for four hours that day, and it had customers
# shopping during every hour but its third one.
#   hour: | 1 | 2 | 3 | 4 |
#   log:  | Y | Y | N | Y |
#                   ^
#                   |
#             No customers during hour 3
# We suspect that we're keeping the store open too long, so we'd like to
# understand when we *should have* closed the store. For simplicity's
# sake, we'll talk about when to close the store by talking about how
# many hours it was open: if our closing time is `2`, that means the
# store would have been open for two hours and then closed.
#   hour:         | 1 | 2 | 3 | 4 |
#   log:          | Y | Y | N | Y |
#   closing_time: 0   1   2   3   4
#                 ^               ^
#                 |               |
#          before hour #1    after hour #4
# (A closing time of 0 means we simply wouldn't have opened the store at
# all that day.)
#
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
n extract only one valid log, "BEGIN Y Y END". For our
purposes, we should ignore any invalid log. *A valid log cannot contain a
nested log. (i.e. Valid logs cannot be nested.) Valid logs can span multiple lines.
Also there can be multiple valid logs on a single line.*
Write a function `get_best_closing_times` that takes an aggregate log
as a string and returns an array of best closing times for every valid
log we can find, in the order that we find them.

Do some simple testing, and then quickly describe a few other tests
you would write given more time.
## Examples
get_best_closing_times("BEGIN Y Y END \nBEGIN N N END")
should return an array: [2, 0]
get_best_closing_times("BEGIN BEGIN \nBEGIN N N BEGIN Y Y\n END N N END")
should return an array: [2]

"""

补充内容 (2022-10-16 07:37 +08:00):
update:收到vo了

评分

参与人数 2大米 +26 收起 理由
waxixi + 1 给你点个赞!
匿名用户-V6JAA + 25

查看全部评分


上一篇:特斯拉 Senior店面
下一篇:谷歌NG VO新鲜面经
🔗
potential_mango 2022-10-14 12:27:59 | 只看该作者
全局:
实习生 VO ?
回复

使用道具 举报

🔗
 楼主| julia1006 2022-10-14 13:19:58 来自APP | 只看该作者
全局:
不是 senior phone call
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表