注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
昨天下午刚面完drawbridge 的Skype interview,原本通知的是onsite interview, 应该是看我人在东部,就改成了Skype interview. 它家面试的题目,基本上地里都有,感谢前人栽树。
第一轮电话面试:
韩国小哥. 1point 3 acres
Move zeroes
/*
input: [0,2,0,-3,5,7,9,0,7,0]-baidu 1point3acres
output: [2,-3,5,7,9,7,0,0,0,0]
-baidu 1point3acres
.
第二轮电话面试:
印度三哥
Given a list of string. Sort them by
1. Sort list of strings by size
2. if length is same, then sort by reversed string
. .и
comment
ouya. ----
foo.--
bar
help
foo
output:
foo
foo
bar
ouya. Waral dи,
help
comment
7 -> [comment]. 1point3acres.com
4 -> [ouya, help]
3 -> [foo, foo, bar]
*/
-baidu 1point3acres
. Waral dи,Skype Interview:
第一轮:
人超级好的三哥!
1. From a list of integer intervals, write a function to minimize the number of overlapping or consecutive ones. Test Input: [4, 8], [3, 5], [-1 2], [10, 12] Test output: [-1, 8], [10,12] 2. SQL query. 三个table, salesman, customer,orders a. The names of all salespeople that have an order with Panasung(one customer's name). b. The names of salespeople that have 2 or more orders.
第二轮: 国人小哥
// given n, find all the prime number less than n // n = 10, return 2, 3, 5, 7 // n = 15, reutrn 2, 3, 5, 7, 11, 13
下面是我的方法, 然后小哥贴出了他自己的方法,使用了大小为n的数组去标记每个数字是不是prime number,从 2 到 n, 按顺序标记各自的倍数是不是prime number, 比如对于2有<4,6,8,10...> 对于3有 <6,9,12,15...> 最后输出结果, 主要是比较了时间复杂度和空间复杂度,以及如何减少内存消耗。 ArrayList<Integer> findPrimes(int n){ if (n <= 1) { return null; } ArrayList<Integer> result = new ArrayList<>(); result.add(2); if (n == 2) { return result; } for (int i = 3; i < n; i += 2) { if(isPrime(result, i)){ result.add(i); } } return result;
} public boolean isPrime(ArrayList<Integer> result, int i) { boolean flag = true; for (Integer item: result) { if(i % item == 0){ flag = false; break; } } return flag; }
第三轮: 不怎么nice的印度小哥, 原本通知我的就只有两轮 Skype interview, 感觉这一轮是临时加出来, 还挺开心的,结果被三哥问倒了。。哭。
In a binary tree, given a root and a node, find path from root to node. code in java
题目还算简单, 我用的DFS去写,没有考虑递归结束,也就是我的代码里,递归会遍历所有的情况,然后他就让我找到结果后就不再递归。然后,就没有然后了。 这也怪自己没有很好的掌握递归。不过面试的时候,三哥一直笑!!!!是那种 "哈哈 我问倒你了吧,你不会了吧 !!!" 一种王宝强上身的感觉!!!摔!!!
这道题问完,他就要结束了,我看当时还剩的时间还多,我就厚着脸皮,让他又问了我一个问题,
use array to implement queue.
没有具体写代码,就问了问我怎么判断队列是空还是满的方法。Over
今天早上,给三哥写了封感谢信, 感觉我要是挂了,应该就是挂在他这里了。。
求offer!!!
.1point3acres
. Waral dи,
. check 1point3acres for more.
. 1point 3acres
补充内容 (2015-7-3 05:06):
下午邮件通知跪了 哭 😭 |