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

FB电面,水过

全局:

2015(1-3月) 码农类General 硕士 实习@meta - 网上海投 - 技术电面  | | Pass | 应届毕业生

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

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

x
来报一个FB电面面筋。
一面:白人。 先问了问简历。 然后做题 LC combination sum 类似题。先写了递归的做法。follow up 如果不用递归怎么做。于是又写了非递归做法。结束。
中间有让我讨论一些code的detail的东西,比如为什么这样做可行,为什么这样可以避
您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 188 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
得要悲剧了。不过他说话挺美国范的。一直说great, cool呀什么的。发音也比较清楚。交流起来感觉还挺不错的。

今天拿到offer了。也祝大家能拿到好的offer!

评分

参与人数 1大米 +20 收起 理由
zach + 20

查看全部评分


上一篇:有亲被liveramp的一个叫takashi的日本人面过吗?
下一篇:bb 电面
全局:
把楼主的代码写了个java版本的,佩服能做出来!
  1. public ArrayList<ArrayList<Integer>> combinationSum(int[] candidates, int target) {
  2.                 ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();
  3.                 ArrayList<Integer> item = new ArrayList<Integer>();
  4.                 Stack<ArrayList<Integer>> res_stack = new Stack<ArrayList<Integer>>();
  5.                 Stack<Integer> sum_stack = new Stack<Integer>();
  6.                 Stack<Integer> index_stack = new Stack<Integer>();
  7.                
  8.                 res_stack.push(item);
  9.                 sum_stack.push(0);
  10.                 index_stack.push(0);
  11.                
  12.                 Arrays.sort(candidates);
  13.                
  14.                 while (!res_stack.isEmpty()) {
  15.                         ArrayList<Integer> item_temp = res_stack.pop();
  16.                         int sum = sum_stack.pop();
  17.                         int start = index_stack.pop();
  18.                        
  19.                         if (sum == target) {
  20.                                 res.add(item_temp);
  21.                         }else if (sum > target) {
  22.                                 continue;
  23.                         }else {
  24.                                 for (int i = start; i < candidates.length; i++) {
  25.                                         int newsum = sum + candidates[i];
  26.                                         ArrayList<Integer> item_temp2 =new ArrayList<Integer>(item_temp);
  27.                                                        
  28.                                         item_temp2.add(candidates[i]);
  29.                                        
  30.                                         res_stack.push(item_temp2);
  31.                                         sum_stack.push(newsum);
  32.                                         index_stack.push(i);
  33.                                 }
  34.                         }
  35.                        
  36.                 }
  37.                 return res;
  38.         }
  39.        
复制代码
回复

使用道具 举报

推荐
ppips 2015-4-2 11:18:08 | 只看该作者
全局:
siren01 发表于 2015-4-2 05:33
楼主好人,求combinationSum的非递归解法,求code

仅供参考
  1. public List<List<Integer>> combinationSum(int[] candidates, int target) {
  2.         Arrays.sort(candidates);
  3.         List<List<List<Integer>>> dp = new ArrayList<List<List<Integer>>>();
  4.         for (int i = 1; i <= target; i++) {
  5.             List<List<Integer>> list_i = new ArrayList<List<Integer>>();
  6.             for (int j = 0; j < candidates.length && candidates[j] <= i; j++) {
  7.                 if (i == candidates[j])
  8.                     list_i.add(Arrays.asList(candidates[j]));
  9.                 else {
  10.                     for (List<Integer> l : dp.get(i - 1 - candidates[j])) {
  11.                         if (candidates[j] <= l.get(0)) {
  12.                             List<Integer> tmp = new ArrayList<Integer>();
  13.                             tmp.add(candidates[j]);
  14.                             tmp.addAll(l);
  15.                             if (!list_i.contains(tmp))
  16.                                 list_i.add(tmp);
  17.                         }
  18.                     }
  19.                 }
  20.             }
  21.             dp.add(list_i);
  22.         }
  23.         return dp.get(target - 1);
  24.     }
复制代码
回复

使用道具 举报

🔗
yuxrose 2015-4-1 15:00:50 | 只看该作者
全局:
晕死,combinations sum也得用非递归写啊。。。。facebook真是魔怔了,每道题都得两种方法。。
lz能说说非递归咋写吗?

恭喜lz!
回复

使用道具 举报

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

使用道具 举报

全局:
how long did lz receive the offer from the second phone interview?
回复

使用道具 举报

🔗
 楼主| smallsimple 2015-4-2 00:53:12 | 只看该作者
全局:
seabiscuit119 发表于 2015-4-2 00:30
how long did lz receive the offer from the second phone interview?

received the offer on the next day.
回复

使用道具 举报

全局:
smallsimple 发表于 2015-4-2 00:53
received the offer on the next day.

so so fast....
回复

使用道具 举报

全局:
smallsimple 发表于 2015-4-2 00:53
received the offer on the next day.

Is there a HR call after the second interview or just an email?
回复

使用道具 举报

全局:
楼主 rp must be too high. 赞一个~
回复

使用道具 举报

🔗
 楼主| smallsimple 2015-4-2 01:50:29 | 只看该作者
全局:
seabiscuit119 发表于 2015-4-2 01:37
Is there a HR call after the second interview or just an email?

电面完第二天中午收到邮件说晚上打个电话聊聊,让确认下时间。然后晚上电话过来就说给offer了。你也有面他家吗?
回复

使用道具 举报

全局:
您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
使用VIP即刻解锁阅读权限或查看其他获取积分的方式
游客,您好!
本帖隐藏的内容需要积分高于 100 才可浏览
您当前积分为 0。
VIP即刻解锁阅读权限 或 查看其他获取积分的方式
Unlock interview details and practice with AI
Popular Interview Questions from Top Companies
回复

使用道具 举报

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

本版积分规则

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