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

发个Houzz的跪经吧

全局:

2016(4-6月) 码农类General 硕士 全职@houzz - 网上海投 -   | | | 应届毕业生

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

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

x
感觉地里他们家面经不多,也是属于初创的Unicorn公司,看里面的人都很牛的样子。
LZ是3月底海投的,岗位是Unity Engineer,一直没有消息。半个月后直到他们recruiter给我打电话,原来是把我邮箱搞错了=_=
然后约了第一轮电面,上来一阵寒暄,然后开始做题
1. two sum, 只要返回任意一个组合就行,还是排好序无重复的那种,瞬秒。
2. three sum,我说先挑一个数字然后再用2sum,他说不错,还能不能更快
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
示了两次才改完所有的bug。。此时已经1小时10分钟了。面试官还是很给面子的,无奈当时水平实在太烂了。。。
然后第二天邮件通知,不出所料的跪了

求大米,然后希望有Unity相关经验的同学可以试着投投哈,感觉他们还是很想招人的。

评分

参与人数 2大米 +100 萝卜 +30 收起 理由
爱丽丝和鲍勃 + 60 + 30
夏虫不知雪花 + 40

查看全部评分


上一篇:半小时前Facebook电面
下一篇:跪求好心googler报timeline
🔗
 楼主| stevez 2016-6-4 05:54:43 | 只看该作者
全局:
好像发错版了。。。这个能移动到面经版么。。
回复

使用道具 举报

🔗
jerryyu3000 2016-6-27 13:27:46 | 只看该作者
全局:
樓主好人 好人一生平安
回复

使用道具 举报

🔗
liu.haonan 2016-10-17 08:35:31 | 只看该作者
全局:
这个我好像以前写过,就是用binary search在查找的时候稍微优化一下。
  1. public class Solution {
  2.     public List<List<Integer>> threeSum(int[] nums) {
  3.         List<List<Integer>> res = new LinkedList<>();
  4.         Arrays.sort(nums);
  5.         if (nums == null || nums.length < 3) return res;
  6.         int curi = Integer.MAX_VALUE;
  7.         for (int i = 0; i < nums.length - 2; i++){
  8.             if (curi == nums[i]) continue;
  9.             curi = nums[i];
  10.             int target = 0 - nums[i];
  11.             int h = i+1, t = nums.length - 1;
  12.             if (nums[i+1] + nums[i+2] > target) break;
  13.             if (nums[nums.length - 2] + nums[nums.length - 1] < target ) continue;
  14.             int curh = Integer.MAX_VALUE;
  15.             int curt = Integer.MIN_VALUE;
  16.             while (h < t){
  17.                 if (h == -1 || t == -1) break;
  18.                 //System.out.println("i = "+ i + ", curh: "+ curh + ", " + nums[i]+ "+" + nums[h] + "+" + nums[t] + "=" + (nums[h] + nums[t]) + ", target = " + target);
  19.                 curh = nums[h];
  20.                 curt = nums[t];
  21.                 if (nums[h] + nums[t] == target){
  22.                     List<Integer> cbn = new LinkedList<>();
  23.                     cbn.add(nums[i]);
  24.                     cbn.add(nums[h]);
  25.                     cbn.add(nums[t]);
  26.                     res.add(cbn);

  27.                     while (h < t && (nums[h] == curh && curt == nums[t])){
  28.                       h++;
  29.                     }
  30.                     while (h < t &&  curt == nums[t]){
  31.                        t--;
  32.                     }
  33.                 } else if ( nums[h] + nums[t] > target){
  34.                     t = helper2(nums, h+1, t, target - curh);
  35.                 } else {
  36.                     h = helper1(nums, h, t-1, target - curt);
  37.                 }
  38.             }
  39.         }
  40.         return res;
  41.     }
  42.    
  43.     public int helper1(int[] nums, int start, int end, int target){
  44.         int h = start;
  45.         int t = end;
  46.         while (h + 1 < t){
  47.             int mid = h + (t - h)/2;
  48.             if (nums[mid] >= target){
  49.                 t = mid;
  50.             }
  51.             else if (nums[mid] < target) h = mid;

  52.         }
  53.         if (nums[h] >= target){
  54.             return h;
  55.         }
  56.         if (nums[t] >= target){
  57.             return t;
  58.         }
  59.         return -1;
  60.     }
  61.     public int helper2(int[] nums, int start, int end, int target){
  62.         int h = start;
  63.         int t = end;
  64.         while (h + 1 < t){
  65.             int mid = h + (t - h)/2;
  66.             if (nums[mid] <= target){
  67.                 h = mid;
  68.             }
  69.             else if (nums[mid] > target) t = mid;
  70.         }
  71.         if (nums[t] <= target){
  72.             return t;
  73.         }
  74.         if (nums[h] <= target){
  75.             return h;
  76.         }
  77.         return -1;
  78.     }
  79. }
复制代码

补充内容 (2016-10-17 08:36):
代码巨丑 = =。。

补充内容 (2016-10-17 08:36):
各位凑合看一下
回复

使用道具 举报

🔗
 楼主| stevez 2016-10-17 14:07:50 | 只看该作者
全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Curated Interview Questions from Top Companies
回复

使用道具 举报

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

本版积分规则

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