由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - Google + Facebook Onsite questions
相关主题
Google电话面试题目几道a家onsite问题讨论贴
Given an int array and an int value. Find all pairs in arrtango家Chris电面出撒题目
求问一道G家的题求问一个题
一道老题目问个google面试题
这些找missing number的题是不是都不能用求和做?divide array into two, sum of difference is min in O(N)
Leetcode: Symmetric Tree有没有好的iterative的解法?来做一个暴力题
leetcode上Symmetric Tree这道题怎么用iterative的方法做?过不了leetcode Zigzag Level Order Traversal
有人整理过FB的面试题么狗狗家onsite面经
相关话题的讨论汇总
话题: given话题: array话题: return话题: google话题: node
进入JobHunting版参与讨论
1 (共1页)
m********6
发帖数: 58
1
Google:
1. Excel spread sheet, each cell is either number or function. When a number
cell is updated, how to effectively update all relevant function cells.
2. Given a folder, return a random file in the folder. File returned must be
uniformed distributed, O(1) memory, can only go through the file system
once.
3. Given an array of TreeNodes. Each Tree Node object only contains a parent
index field which is the index of the parent node in the array. Parent Node
is required to be in front of child node in the array. Array can contain
multiple trees. Root node has parent index pointing itself. Write a delete
function which takes the initial array list of TreeNodes as well as a Set of
TreeNodes to be deleted. Delete all tree nodes in the delete set as well as
its children. Resulting array list can not have holes.
4. Given an array of numbers and a min gap G. Return the max sum in the
array, max sum may not contain two numbers that are less than G apart.
5. Design Google Doc.
Facebook:
1 (Warm up). Given string a and string b, return if a contains b. (can not
use contains obviously)
2 (Warm up). Given a string, return if it's a palindrome. (aba is a
palladium)
3. Given a matrix, implement two functions. Get sum takes minX, maxX, minY,
maxY and returns the sum of the rectangle. Set index takes x, y, value and
sets cell x,y to that value. Get sum need to be O(1) and set index can be
slow.
4. Each letter maps to its location in the alphabet. (A->1, B->2, K->11, Z->
26). Given a valid int string, return the number of alphabet sequence it can
map to. For example, 111 can be AAA, AK, KA, so the return value should be
3.
5. Given an almost sorted array and max deviation D. Each element in the
array can not be more than D apart from its sorted index. Sort the array.
6. Given int array P and int N. Return the number of ways you can make N
with elements of array P. For example, if P is [1,2] and N is 3, you can do
111,12. so the answer is 2. You may not count 1,2 and 2,1 twice.
7. Given a int array list, return a sub array list that contains the longest
non decreasing sequence. If there are more than one available, you can
return any one.
8. Design Instagram.
Misc:
1. Given a Date object that contains year, month and day and int addition
days, Implement the add function and return the resulting Date object.
2. Given a string s and string pattern. Return if s fits the pattern.
Pattern may contain . and *. . can be matched to any character where * can
be matched to any sequence of characters. For example, abba matches pattern
*a and .b.a.
3. Implement a bowling game. There are two functions, roll(int pins), and
getScore(). Caller will call roll until the game is over and call getResult
to get the result.
4. Assume progress is a double between 0 and 1 and time is also a double
between 0 and 1. You are given a function getProgress(double time),
implement a function getTime(double progress). You may define an epsilon.
5. What is the run time complexity of merging one link list to another? What
is the run time complexity of Link List addAll in Java and C++? Why?
6. Implement pow(double base, int exponent).
l**g
发帖数: 133
2
赞,祝offer。都是很累人累心的题目是
m********6
发帖数: 58
3
Google offered T5.
Facebook didn't like my Instagram answer, I didn't get an offer.
Jet.com indicated that they want to make me an offer that is heavy on stock
options. But they got bought by Walmart before they can finalize.
I have been in finance for 8 years. My current firm is underperforming right
now. I thought it's a good time for me to get out of finance and do
something different. But my previous boss learned through friends that I'm
job searching, he convinced me to interview with them. They ended up making
me a god father offer that is way above Google's package. Looks like I'm
staying in finance unless my current employer enforces some crazy non
compete. I don't think they have enough money to pay non compete right now
though.
f*******t
发帖数: 7549
4
恭喜楼主!
m********6
发帖数: 58
5
Thank you
l*****z
发帖数: 3022
6
强人啊!
具体说说,狗的offer是多少?crazy high offer又是多少?也许狗能beat呢

stock
right
making

【在 m********6 的大作中提到】
: Google offered T5.
: Facebook didn't like my Instagram answer, I didn't get an offer.
: Jet.com indicated that they want to make me an offer that is heavy on stock
: options. But they got bought by Walmart before they can finalize.
: I have been in finance for 8 years. My current firm is underperforming right
: now. I thought it's a good time for me to get out of finance and do
: something different. But my previous boss learned through friends that I'm
: job searching, he convinced me to interview with them. They ended up making
: me a god father offer that is way above Google's package. Looks like I'm
: staying in finance unless my current employer enforces some crazy non

g*********e
发帖数: 14401
7
Would you mind sharing a ballpark number or ranges?
l*******i
发帖数: 25
8
Congrats! Mind sharing ur solution for the Excel problem? thx
m********6
发帖数: 58
9
For the excel question, the solution is DFS and link list.
Say each cell contains value as well as a list of depended cells.
void update(Cell c, Set s, LinkedList l)
if (!s.add(c)) return;
for (Cell d : c.dependents)
update(d,s,l);
l.addHead(c);
List updateOrder(Cell c)
Set s = new HashSet();
LinkedList l = new LinkedList();
update(c,s,l);
Return l;
m********6
发帖数: 58
10
I'm getting Google + 100k all cash
No way Google up their offer 100k.
相关主题
Leetcode: Symmetric Tree有没有好的iterative的解法?几道a家onsite问题讨论贴
leetcode上Symmetric Tree这道题怎么用iterative的方法做?tango家Chris电面出撒题目
有人整理过FB的面试题么求问一个题
进入JobHunting版参与讨论
l**g
发帖数: 133
11
[在 monopoly86 (monopoly) 的大作中提到:]
:I'm getting Google + 100k all cash
:No way Google up their offer 100k.
狗给你300k+吗?大牛逼啊!congrats!
G****n
发帖数: 618
12
T5 300k应该normal的.

★ 发自iPhone App: ChineseWeb 11

【在 l**g 的大作中提到】
: [在 monopoly86 (monopoly) 的大作中提到:]
: :I'm getting Google + 100k all cash
: :No way Google up their offer 100k.
: 狗给你300k+吗?大牛逼啊!congrats!

l*****z
发帖数: 3022
13
关键狗现在给你的是多少?狗T5其实是能给到40万的。。。
还有就是match的啥子组,做dl比做finance前途可能要光明不少。。。

【在 m********6 的大作中提到】
: I'm getting Google + 100k all cash
: No way Google up their offer 100k.

w*****p
发帖数: 6
14
How do you solve the delete function in Google question. 3 ? Could you talk
about more
m********6
发帖数: 58
15
For question 3, use a new position array and keep track of number of deleted
. Going through the array once, if a node is in delete set or if the new
position of parent is -1. Delete the node by increment delete count and set
the new position to -1. If the node is not deleted, new index is current
index minus number of deleted nodes. Move the node to new index and reset
the parent index using the new position array. Trim the array list after you
finish.
E********e
发帖数: 63
16
What about G qs 4
4. Given an array of numbers and a min gap G. Return the max sum in the
array, max sum may not contain two numbers that are less than G apart.
m********6
发帖数: 58
17
I used recursion.
F(k) = Max(F(k-1), array[k] + F(k-G-1))
Use dp to save F(k)
If k is negative, F(k) is 0
E********e
发帖数: 63
18
thx, big cong

【在 m********6 的大作中提到】
: I used recursion.
: F(k) = Max(F(k-1), array[k] + F(k-G-1))
: Use dp to save F(k)
: If k is negative, F(k) is 0

u***8
发帖数: 1581
19
大妞,膜拜
a****l
发帖数: 30
20
How to solve q2 of G?
Does folder contains sub-folders?
m********6
发帖数: 58
21
Yes. Folder contains sub folders.
1 (共1页)
进入JobHunting版参与讨论
相关主题
狗狗家onsite面经这些找missing number的题是不是都不能用求和做?
Leetcode 中文版Leetcode: Symmetric Tree有没有好的iterative的解法?
Binary Tree Level Order Traversal为什么老通不过leetcode上Symmetric Tree这道题怎么用iterative的方法做?
G家最新电面有人整理过FB的面试题么
Google电话面试题目几道a家onsite问题讨论贴
Given an int array and an int value. Find all pairs in arrtango家Chris电面出撒题目
求问一道G家的题求问一个题
一道老题目问个google面试题
相关话题的讨论汇总
话题: given话题: array话题: return话题: google话题: node