📣 黑五网一特惠|VIP一年通行证5折,蓝莓、Offer多多同步特惠
回复: 8
跳转到指定楼层
上一主题 下一主题
收起左侧

stripe 2023 intern vo

🔗
匿名用户-TF6JK  2022-11-3 04:33:19 |倒序浏览

2023(4-6月) 码农类General 本科 实习@stripe - Other - 技术电面  | 😃 Positive 🙂 Easy | Other | 应届毕业生

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

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

x
和地里的题是一样的,一共四小问!求大米,继续看别的面经QWQ!
/*


* Click `Run` to execute the snippet below!
*/

import java.io.*;
import java.util.*;

/*
* To execute Java, please define "static void main" on a class
* named Solution.
*
* If you need more classes, simply define them inline.


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.)

First, let's define a "penalty": what we want to know is "how bad
would it be if we had closed the store at a given
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
that it's correct. Do
some simple testing, and then quickly describe a few other tests
you would write given more time.




Over time these aggregate log files can get very large, so write
another function, `get_best_closing_times__v2`. This should work like
the previous one, but with two important differences:

  - Instead of accepting an aggregate log as a string, it should
    accept a *filename* (and *not* the contents of the file.)
  - It should take care *not to read the whole file's contents at
    once*, and instead should stream the file as it goes. Assume that
    the whole file is too large to fit in memory. (You can, however,
    safely assume that each individual line of the file can fit in
    memory.)

In all other respects, this function should behave like
`get_best_closing_times`, finding the valid log sequences and
returning an array of the best closing times corresponding to each.

*/

评分

参与人数 13大米 +33 收起 理由
匿名用户-ZIU7S + 20
JillianXie + 1 赞一个
Hedgehog_ye + 1 很有用的信息!
菠萝菠萝蜜244 + 1 赞一个
christineji + 1 很有用的信息!

查看全部评分


上一篇:Tiktok SWE intern vo 第一轮
下一篇:akuna capital python Summer 2023 internship Phone面经
地里匿名用户
推荐
匿名用户-TF6JK  2022-11-3 10:41:27 来自APP
面试前自选语言,求米!
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-0ZG51  2022-11-3 05:07:11 来自APP
请问楼主收到下一轮的通知了么?已加米hh
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-TF6JK  2022-11-3 08:04:42 来自APP
匿名用户 发表于 2022-11-02 14:07:11
请问楼主收到下一轮的通知了么?已加米hh
还没有 感觉无了 人已经佛系了🙏
回复

使用道具 举报

地里匿名用户
🔗
匿名用户-HW8GS  2022-11-3 08:35:49 来自APP
请问一定要用java吗
回复

使用道具 举报

全局:
什么时候提交的OA?
回复

使用道具 举报

🔗
lxcccccccc 2022-11-3 11:53:38 | 只看该作者
全局:
姐姐太厉害啦
回复

使用道具 举报

🔗
Li_Helen 2022-11-4 09:08:50 | 只看该作者
全局:
太牛了太牛了 怎么加米呀
回复

使用道具 举报

全局:
这不是电面吗
回复

使用道具 举报

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

本版积分规则

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