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

FB面经

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

使用道具 举报

🔗
YukiApril4 2017-7-7 07:30:23 | 只看该作者
全局:
请问楼主1.2能具体讲讲吗?不太明白。
回复

使用道具 举报

全局:
design fb for in box 这句有意思
回复

使用道具 举报

🔗
zzgzzm 2017-7-15 21:50:31 | 只看该作者
全局:
Diameter of Tree: Postorder-Traversal on max single path down
  1.     int diameterOfBinaryTree(TreeNode* root) {
  2.         maxDown(root);
  3.         return maxLen;
  4.     }
  5.    
  6.     int maxDown(TreeNode* r) {
  7.         if (!r) return 0;
  8.         int maxL = maxDown(r->left), maxR = maxDown(r->right);
  9.         maxLen = max(maxLen, maxL+maxR);
  10.         return max(maxL, maxR) + 1;
  11.     }
  12.    
  13.     int maxLen = 0;
复制代码
回复

使用道具 举报

🔗
zzgzzm 2017-7-15 22:03:32 | 只看该作者
全局:
1.2 find the point which have the maximum overlap of intervals: Is this the one equivalent to find the max number of population given birth/death certificate?
  1. int maxNumberOfOverlap(std::vector<std::vector<int>>& intervals) {
  2.     std::map<int, int> count;
  3.    
  4.     for (const auto& inter : intervals)
  5.         count[inter[0]]--, count[inter[1]]++;
  6.    
  7.     int res = 0, sum = 0;
  8.     for (const auto& p : count) {
  9.         sum += p.second;
  10.         res = max(res, sum);
  11.     }
  12.     return res;
  13. }
复制代码
回复

使用道具 举报

🔗
zzgzzm 2017-7-15 22:27:17 | 只看该作者
全局:
binary tree to circular double linked list:
  1. vector<Node*> tree2DoubleList(Node* r) {
  2.     if (!r) return {NULL, NULL};
  3.     auto L(tree2DoubleList(r->left)), R(tree2DoubleList(r->right));
  4.    
  5.     if (L[1]) L[1]->right = r, r->left = L[1];
  6.     if (R[0]) R[0]->left  =r, r->right = R[0];
  7.     return { (L[0]? L[0] : r), (R[1]? R[1] : r) };
  8. }

  9. Node* tree2CircularList(Node* r) {
  10.     auto hr(tree2DoubleList(r));
  11.     if (hr[0]) hr[0]->left = hr[1], hr[1]->right = hr[0];
  12.     return hr[0];
  13. }
复制代码
回复

使用道具 举报

🔗
f1371342385 2017-8-25 10:52:45 | 只看该作者
全局:
LZ能详细说说1.2嘛
回复

使用道具 举报

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

使用道具 举报

🔗
onerepublic 2017-8-30 00:32:03 | 只看该作者
全局:
感谢楼主分享面经哈,能问一下2.1 career的具体要求吗?谢谢啦
回复

使用道具 举报

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

使用道具 举报

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

本版积分规则

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