`

FLAG面经集合

 
阅读更多

General

  • The Five Essential Phone-Screen Questions link
    • 虽然之前看过了,不过还是再来一遍吧~
  • Palantir blog上有一堆面试提醒
  • HiredInTech还有一个talk讲得也还可以link

C++ & OOD

Misc

  • mutexes and semaphores link
  • priority inversion link

Amazon

Behavior

  • Introduce yourself
  • 简历里面的项目
  • 为什么适合软件工程师
  • Most challenging technical problem

Technical

  • Zigzag traversal of binary tree - stack
  • matrix index - binary search
  • rotate image - mess...
  • min depth:
  • prime number between m and n - 埃拉托色尼
  • 俩数组找intersection,follow-up: scale
  • 公共祖先, follow-up: 有parent node - recursive, parent: 求高度差,上移
  • list,不断加入数目,求平均数 - 用两个heap!
  • 有一个int数组,每个int的范围都是1到10000,找出最小的不存在的数。比如array={3,1,4} return 2 - 经典: link

Facebook

  • infix计算器
    • 正常地做,用两个栈,注意优先级
    • 或者转化成RPN做,link
  • careercup:随机返回数组的最大值中的一个 link
    • reservoir sampling! 
  • 数学表达式化简 link
  • volatile, explicit (link)
  • 也有read4k link
  • oneEditAway
  • http://alfasin.com/facebook-interview-questions/
  • longest common SUBSTRING link

Google

  • 最长等差数列
    • dp[i][j]表示以a[i]和a[j]结尾的数列的最大长度
  • A数组、B数组,两两求和得C数组,求C数组的第K大(不能暴力!)
    • 首先来道初级的,求A,B数组并集中的第K大(假设A,B无重复元素)
      • O(lg k) = O(lg (m + n)):
        • 多么艰难的理解…… link
        • 其实想想这还好啦……
    • 这TM才是艰难地提升……求A,B数组所有pair sum中的第k小……
      • 注意到其实这跟“在行列都排好序中第k小是一样的道理”!!!!
      • O(klgk) - 堆,把(i, j)作为pair push进去,每次弹出来后,再把(i + 1, j)和(j, i + 1)push进去…… link
      • 二分搜 linklink
      •  
  • 设计candy crush
  • rearrange数组使得正负数交替出现,且保持出现顺序 O(n) O(1) link
  • rearrange数组使得大小交替出现,O(n) link
  • 设计一个数据结构 , 使 删除 查找 添加 修改得复杂度都是 O(1)时间
    • http://www.mitbbs.com/article_t/JobHunting/32771637.html
    • Array + hash
  • 4096buffer link(直接搜read 4096也有 careercup) 难~
     
  • 判断一个string是不是utf 8:注意utf的第一位肯定是负数(110xxxxx, 1110xxxx, 11110xxx),后面跟的肯定是10xxxxxx
  • 实现autocomplete link link
 

LinkedIn

  • Codility: sum of digits of factorials 
  • max product of subarray
    • 维护max和min,如果遇到整数直接更新;如果是零重置;如果是负则交换两个值然后再乘

Dropbox

  • 很好的一道题:给hit和getHit()函数,返回5分钟之内hit被call的次数
    • 如果数目小的话,就用双向链表或Q就可以了
    • 数字大的话用circular buffer
    • link 

AirBnb

  • 给定一个word list 和一个target word,要求输出在word list 里跟target 
    word的edit distance 相差不大于k的所有words
    • 解法用类似trie的结构,边存储的是编辑距离 http://www.matrix67.com/blog/archives/333

Two Sigma

  • 求置信区间

面经

买买提上某人的高频题 http://www.mitbbs.com/article_t/JobHunting/32058385.html
详尽的面经,还有一些准备 http://chuansongme.com/n/290160
一亩三分地上的面经,很全F, G, T, A, BB家!!!!!!link 

FLG

  • http://www.mitbbs.com/article_t/JobHunting/32767743.html
  • http://www.amoduo.com/article/view/1004981.html (F + G)
  • http://bbs.cssa-uh.org/viewthread.php?tid=5897 (F + G)

Google

  • http://www.mitbbs.com/article_t/JobHunting/32687791.html
  • http://www.mitbbs.com/article_t/JobHunting/32689155.html
  • http://www.mitbbs.com/article_t/JobHunting/32785665.html
  • 一亩三分地上所有的Google题 link
  • link
  • 近期面经
    • 超级大合集!!
      • reverse bits
        • x = (((x & 0xf0) >> 4) | ((x & 0x0f) << 4)); //头四位和后四位互换
        • x = (((x & 11001100b) >> 2) | ((x & 00110011b) << 2)); //01位和23位互换,45
        • 位和67位互换
        • x = (((x & 10101010b) >> 1) | ((x & 01010101b) << 1));//0和1位互换,2和3位互
        • 换,4和5位互换,6和7位互换
      • 最长01串
      • volatile
      • skip list
    • 一亩三分地上的大合集!!!
      • serialize a binary tree link
    • http://www.1point3acres.com/bbs/thread-101600-1-1.html
    • http://www.1point3acres.com/bbs/thread-101580-1-1.html
    • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=88298&extra=page%3D1%26filter%3Dsortid%26sortid%3D311%26sortid%3D311
    • http://www.1point3acres.com/bbs/thread-90080-1-1.html
    • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=81559&extra=page%3D1%26filter%3Dsortid%26sortid%3D311%26sortid%3D311
    • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=96088&extra=page%3D1%26filter%3Dsortid%26sortid%3D311%26sortid%3D311
    • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=106442&extra=page%3D1%26filter%3Dauthor%26orderby%3Ddateline%26sortid%3D311%26sortid%3D311%26orderby%3Ddateline
    • http://www.mitbbs.com/article_t/JobHunting/32803273.html
    • http://www.mitbbs.com/article_t/JobHunting/32279127.html
    • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=106578&extra=page%3D1%26filter%3Dauthor%26orderby%3Ddateline%26sortid%3D311%26sortid%3D311%26orderby%3Ddateline
    • http://www.mitbbs.com/article_t/JobHunting/32290309.html(一堆)
    • http://www.mitbbs.com/article_t/JobHunting/32798813.html(比较难的entry level!)
    • http://www.1point3acres.com/bbs/forum.php?mod=collection&action=view&ctid=92 (tag!!!!)
    • http://www.mitbbs.com/article_t/JobHunting/32288151.html

Facebook

  • GD上new grad的面经 link
  • http://www.mitbbs.com/article_t/JobHunting/32777161.html
  • 直接搜Google facebook面经
  • 近期ms f面经 link
  • 9.16电面 link
  • http://www.mitbbs.com/article_t/Dreamer/34329571.html
  • http://www.mitbbs.com/article_t/JobHunting/32812179.html
  • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=86176&extra=page%3D1%26filter%3Dsortid%26sortid%3D311%26sortid%3D311
  • http://www.aiweibang.com/yuedu/228195.html
  • http://www.weiming.info/zhuti/JobHunting/32760941/
  • http://www.mitbbs.com/article_t/JobHunting/32568289.html
  • http://www.1point3acres.com/bbs/forum.php?mod=viewthread&tid=106385&extra=page%3D1%26filter%3Dsortid%26sortid%3D311%26sortid%3D311
  • http://www.1point3acres.com/bbs/thread-107789-1-1.html
  • http://www.1point3acres.com/bbs/thread-107803-1-1.html
  • http://www.1point3acres.com/bbs/thread-76316-1-1.html
  • http://www.mitbbs.com/clubarticle_t/New_Mommy_and_New_Daddy/20344137.html
  • http://www.amoduo.com/article/view/1003230-facebook-.html
  • http://www.1point3acres.com/bbs/thread-107946-1-1.html
  • http://alfasin.com/facebook-interview-questions/ (大集合)
    • 4. Print the sum of all the numbers at every vertical level in a binary tree
      • deque,记住deque是动态数组,list才是双向链表!
    • 5. 带权值scheduling,背包
      • 先求一个p数组,p[i]表示之前(按结束时间排序后)最靠近i的任务编号
      • v[i] = max{value[i] + v[p[i]], v[i - 1]}
    • 8. Given an input array and another array that describes a new index for each element, mutate the input array so that each element ends up in their new index. Discuss the runtime of the algorithm and how you can be sure there won’t be any infinite loops.
      • 最直接的:新开一个数组,不管合不合法都可以
      • 其次,按新index排序,最后扫一遍看合不合法(或者直接排序时抛异常0, O(nlgn), O(1)
      • 若保证合法,直接swap,跟missing positive很像,见mutate.cpp O(n) O(1)
      • 要算最长圈数,在swap的时候加一个变量,转到A[B[i]] == A[i]的时候更新ans
    • 18. infix 计算器
      • 直接算就是了
      • 注意中缀转后缀 link
    • 22. behavior - How do you use Facebook app and what are the problems with it? How would you fix it?
    • 31. behavior - 跟高级有出入
    • 32. kth is BST
    • 38. check if a polygon is simple
      • 假设合法多边形,检查是否一直右转或左转~叉乘算方向: x1 * y2 - x2 * y1

LinkedIn

  • http://www.mitbbs.com/article_t/JobHunting/32692253.html

Design复习

Behavior

  • http://www.mitbbs.com/article_t/JobHunting/32773661.html
  • http://www.mitbbs.com/article_t/JobHunting/32774907.html

Reference:

https://sites.google.com/site/careerofpsyclaudezintheus/company

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics