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

[找工就业] flexport 最新电面 第二轮 面经

全局:

2019(10-12月)-CS硕士+短暂实习或全职不超过3个月 | 网上海投|芝加哥地区 码农类General实习@flexport

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

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

x
flexport实习电面, 45min, 一共一道题, 有个follow up。面试的小哥好像是个华人, 但是口语非常好, 可能是很早就来美国的那种。

Given a string, implement a method that given a word in the sentence, randomly return one of its following words. Plus, if the given wrod is in the end of the string, the first word is counted as
its following word.

解答: 写了一个hashmap, key is every word in the string, value is a list of word that follows it. .google  и

Follow up: given a substring of the sentence, return the next words of the substring.

解答: 我本来想要用Trie做的, 但是发现 space complexity 太高了, 经面试官提醒, 改成用substring作为hashmap的key。但是implementation 有点麻烦, 特别是包含最后一个word到第一个word的情况, 所有最后也没有写完。

不设积分限制了, 希望小天使们给我加点大米。 有问题我会回复的。


. Χ

评分

参与人数 9大米 +18 收起 理由
zneiaf707 + 1 很有用的信息!
nyn88 + 1 很有用的信息!
Jerry_37 + 10
ltd0215 + 1 给你点个赞!
SamTheFighter + 1 欢迎分享你知道的情况,会给更多积分奖励!

查看全部评分


上一篇:亚麻sde 狗家sre
下一篇:请问上周五面亚麻的小伙伴们有没有今天update的啊。。
推荐
 楼主| 波士顿以北 2019-12-19 13:47:17 | 只看该作者
全局:
pcheng11 发表于 2019-12-18 15:25.google  и
follow up 里的输入 为全部空格间隔的word 还是说有标点符号啊

可以是String array, 也可以是空格隔开word的一个string 作为key。
回复

使用道具 举报

🔗
pcheng11 2019-12-18 15:25:33 | 只看该作者
全局:
follow up 里的输入 为全部空格间隔的word 还是说有标点符号啊
回复

使用道具 举报

🔗
pcheng11 2019-12-20 01:58:33 | 只看该作者
全局:
楼主有进展了吗?
回复

使用道具 举报

🔗
clarali 2019-12-27 08:34:45 | 只看该作者
全局:
请问楼主follow up有说substring的size嘛
回复

使用道具 举报

🔗
googletalk 2019-12-27 08:43:03 | 只看该作者
全局:
the company is a scam! bad credit.
回复

使用道具 举报

🔗
 楼主| 波士顿以北 2019-12-29 11:12:49 | 只看该作者
全局:
clarali 发表于 2019-12-27 08:34.1point3acres
请问楼主follow up有说substring的size嘛

substring 是作为input给的, 没有限定长度, 可能会比原来的string 更长。 比如原来的string是 is a box, substring可以是 is a box is a, 你可以把原来的string视为不断循环的一个string。
. ----
--------
小天使请帮我加点大米吧谢谢!
回复

使用道具 举报

🔗
clarali 2019-12-30 03:39:41 | 只看该作者
全局:
波士顿以北 发表于 2019-12-29 11:12.1point3acres
substring 是作为input给的, 没有限定长度, 可能会比原来的string 更长。 比如原来的string是 is a box ...

感谢楼主 已加米。
回复

使用道具 举报

🔗
Soul_V 2020-1-17 05:15:24 | 只看该作者
全局:
请问lz可以分享一下一轮电面面经嘛
回复

使用道具 举报

🔗
DreamerSea183 2022-12-26 00:13:48 | 只看该作者
全局:
googletalk 发表于 2019-12-27 08:43
the company is a scam! bad credit.

怎么说?
回复

使用道具 举报

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

本版积分规则

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