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

yelpOA

全局:

2015(4-6月) 码农类General 硕士 全职@yelp - 网上海投 - 在线笔试  | | Pass | 应届毕业生

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

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

x
section1:
what is the linux signal (number) for kill command-S
It is 9

从代码文件中找一个function-S
“grep”
SSL stands for? Full form of SSL and what does it do?-S
Short for Secure Sockets Layer, a protocol developed by Netscape
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
l is TCP.
测试一个ip地址的response - S
“ping”
section2:
leetcode:Reverse Words in a String II。 如果使用java,记得把stdin and stdout 输入输出写好,他家要用到


评分

参与人数 1大米 +3 收起 理由
hit_piggy + 3 感谢分享!

查看全部评分


上一篇:airbnb电面
下一篇:google电面
推荐
65岁退休 2015-4-10 01:57:04 | 只看该作者
全局:
hit_piggy 发表于 2015-4-7 12:56
in place? Java怎么办,不是肯定得str.split(" ")新建一个String数组了吗。。

O(n) runtime, O(1) space – In-place reverse:
Let us indicate the ith word by wi and its reversal as wi′. Notice that when you reverse a
word twice, you get back the original word. That is, (wi′)′ = wi.
The input string is w1 w2 ... wn. If we reverse the entire string, it becomes wn′ ... w2′ w1′. Finally, we reverse each individual word and it becomes wn ... w2 w1. Similarly, the same result could be reached by reversing each individual word first, and then reverse the entire string.

public void reverseWords(char[] s) {
   reverse(s, 0, s.length);
   for (int i = 0, j = 0; j <= s.length; j++) {
      if (j == s.length || s[j] == ' ') {
         reverse(s, i, j);
         i = j + 1;
} }
}
private void reverse(char[] s, int begin, int end) {
   for (int i = 0; i < (end - begin) / 2; i++) {
      char temp = s[begin + i];
      s[begin + i] = s[end - i - 1];
      s[end - i - 1] = temp;
} }
Challenge 1:
Implement the two-pass solution without using the library’s split function.
Challenge 2:
Rotate an array to the right by k steps in-place without allocating extra space. For instance, with k = 3, the array [0, 1, 2, 3, 4, 5, 6] is rotated to [4, 5, 6, 0, 1, 2, 3].



补充内容 (2015-4-10 01:58):
leetcode讲解的官方解法,不过没有考虑首尾有空格的情况。

本帖子中包含更多资源

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

x
回复

使用道具 举报

推荐
 楼主| mm豆 2015-4-11 06:42:44 | 只看该作者
全局:
65岁退休 发表于 2015-4-11 03:26
不不不,路过看看的。我现在掉进设计的坑里出不来,去哪里面都是设计题,算法题只有一个电面问了reverse  ...

pat pat, 这个OA他们家的固定题目,连电面都不是,后面还不知道怎么折腾呢,而且她家不靠谱,给了offer都有收回的,你是说amazon的面经全是设计题?
回复

使用道具 举报

推荐
65岁退休 2015-4-11 03:26:18 | 只看该作者
全局:
mm豆 发表于 2015-4-11 02:08
你也面她家?????

不不不,路过看看的。我现在掉进设计的坑里出不来,去哪里面都是设计题,算法题只有一个电面问了reverse string,完了onsite又全是设计题……我真是掉进怪圈了……说好的New grad的算法题呢!!我看你的面经好羡慕啊!!!啊!我也要算法题啊!!!
回复

使用道具 举报

🔗
hit_piggy 2015-4-7 12:56:14 | 只看该作者
全局:
in place? Java怎么办,不是肯定得str.split(" ")新建一个String数组了吗。。
回复

使用道具 举报

🔗
 楼主| mm豆 2015-4-7 21:56:48 | 只看该作者
全局:
hit_piggy 发表于 2015-4-7 12:56
in place? Java怎么办,不是肯定得str.split(" ")新建一个String数组了吗。。

我没有inplace,java的string是不可变的,不可能inplace
回复

使用道具 举报

🔗
freakpao 2015-4-7 23:44:55 | 只看该作者
全局:
lz怎么申的yelp呀 知道yelp下来的录人流程怎样吗
回复

使用道具 举报

🔗
 楼主| mm豆 2015-4-10 01:43:46 | 只看该作者
全局:
freakpao 发表于 2015-4-7 23:44
lz怎么申的yelp呀 知道yelp下来的录人流程怎样吗

网投,不知道                  
回复

使用道具 举报

🔗
freakpao 2015-4-10 02:20:51 | 只看该作者
全局:
65岁退休 发表于 2015-4-10 01:57
O(n) runtime, O(1) space – In-place reverse:
Let us indicate the ith word by wi and its reversal ...

咦? leetcode官方解法? 一直不知道还有官方的解法 求层主网址在哪看的呀 谢啦!
回复

使用道具 举报

🔗
65岁退休 2015-4-10 02:24:26 | 只看该作者
全局:
freakpao 发表于 2015-4-10 02:20
咦? leetcode官方解法? 一直不知道还有官方的解法 求层主网址在哪看的呀 谢啦!

就是leetcode卖的书……
我记得有人分享下载的,我不记得链接在哪了。你如果找不到私我个邮箱我发给你,文件太大回复楼的附件放不下=-=
回复

使用道具 举报

🔗
leeshell 2015-4-10 23:03:47 | 只看该作者
全局:
LZ你收到电面了吗?
回复

使用道具 举报

🔗
 楼主| mm豆 2015-4-11 02:08:24 | 只看该作者
全局:
65岁退休 发表于 2015-4-10 01:57
O(n) runtime, O(1) space – In-place reverse:
Let us indicate the ith word by wi and its reversal ...

你也面她家?????
回复

使用道具 举报

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

本版积分规则

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