Redian新闻
>
有人整理过FB的面试题么
avatar
有人整理过FB的面试题么# JobHunting - 待字闺中
d*n
1
方不方便给我发一份
愿意发包子或私下分享我知道的信息
多谢!
avatar
f*4
2
二爷总结那个leetcode高频题挺靠谱的
时间来不及可以照着频率高的刷

【在 d***n 的大作中提到】
: 方不方便给我发一份
: 愿意发包子或私下分享我知道的信息
: 多谢!

avatar
a*9
3
之前稍微收集了一下
glassdoor
===================
edit distance
level traverse tree(高频)
1) Calculate the square root of a double(高频)
2) Given n intervals [si, fi], find the maximum number of overlapping
intervals.
3) Print all the paths from root to every leaf in a binary tree.
4) Print the sum of all the numbers at every vertical level in a binary tree
5) Given a set of n jobs with [start time, end time, cost] find a subset so
that no 2 jobs overlap and the cost is maximum ?
6) Given 1 trillion messages on fb and each message has at max 10 words, how
do you build the index table and how many machines do you need on the
cluster to store the index table ?
total data = 1 trillion * 10 words * 6 bytes / word = 60TB = one small
NetApp box
index by hashed userid ; will distribute traffic effectively across servers
; cache active users recent messages in memory
mapreduce
return the value of a roman number given in a string
Given two string representations of binary numbers (e.g. "1001", "10") write
a function that adds them and returns the result as a string as well (e.g.
"1011").
a) first, write a function to calculate the hamming distance between two
binary numbers
(b) write a function that takes a list of binary numbers and returns the sum
of the hamming distances for each pair
O(n) solution is recore each position how many 1 and how many 0, and
multiply them for each position and add together
combination(高频)
permutation , the k-th permutation
You are given a string with each english character translated to its
alphabetical position (e.g., the string "ABC" --> "123"). Provide a function
that, when provided the string as an argument, will return the maximum
number of strings the encoded string could represent (for example, "123"
could represent "ABC", "LC", or "AW").
kind of like DFS
Database design
FB Check In services
Getting maximum and minimun number was not difficult but getting less than n
comparison was tricky
sorted? bucket? radix?
BFS
strstr()
The second problem was another classic DP problem. Finding the sum of 1's in
a submatrix. I went on to describe the recurring relation for the
subproblem in the linear case. She didn't want me to do that and she quickly
said the solution to the 2D case was a generalization of the 1D case.
seems is find the max sum submatrix, time O(n^3), space O(n^2) 2D version of
Kadane's
a palindrome for strings with symbols and spaces in them
finding all the anagrams in an array of strings
finding the number of ways a given score could be reached for a game with 3
different ways of scoring (e.g. 3, 5 and 10 points). aka leetcode Climbing
Stairs
printing a binary tree L-R, (from left to right?? level traversal?
and implementing a comparator function to sort files based on a certain
naming convention.
regular_expression_match
graph traversal
Implement a LRU cache in C++.
Given a binary search tree, write an algorithm to find the kth smallest
element
inorder seach
binary search on a shifted array, find the offset (2) in log n
find the beginning of the array, if (right - left <= 1) then return min(
left,right);
design newsfeed
write a json beautify
Given a vector of Nodes, each of which contain the start and end time of a
meeting, find the maximum number of rooms one would have to book for the day
.
seems is the max overlap: 1) sort based on start time 2) scan meeting one by
one, insert new meeting, and then scan the meetings in linked list, if they
stil valid for the new start time, then max++, otherwise clear them out
time should be O(n^2)
How would you query for all the Places near a given coordinate? The focus is
on how to scale this to a large number of places while keeping response
time to within acceptable user expectacions.
finding anagrams in a string.
Reverse a linked list
Identify if the words in a given sentence are in a built in dictionary.
===============================================
mitbbs
============
bubble sort
leetcode 电话号码
When will java destruct object. (automatic garbage collection for
unused object that no reference points to it, finalize() method is called
weh it decide to collect it)
8. Java stuff: how to avoid other programmer from changing the function.
(Final keyword)
What is the transient keyword.(indicate that a field should not be
serialized.aka not persisted )
How to use stacks to simulate queue(two stacks)
lowest common ancestor(cc150 P233)
Given a linked list, say A->B->C, print it in reversed order. Time &
space analysis. What if I want the original list not changed?(recursion) How
about
multithreads call this functions simultaneously?(seems ok?)
怎么判断两个linkedlist meet(make the first linkedlist tail point to the head
of the second linkedlist, then become the find cycle problem, if just 判断
then loop two list then if the last element is the same then it will meet.)
有个矩阵,里面都是0和1,找最大的cluster,相邻或对角(BFS, search 1, then BFS
it, market visited point to #, get the areas, at the end revert # to 1)
longest increasing subsequence:
revert linkedlist(recussion and non-recussion)
leetcode sort color
两个list相加,优化代码
regular expression
given an array, find out the max sum of a set that each elements are non-
设计题,地图搜索,怎样设计index
avatar
s*s
4
谢谢分享
avatar
n*e
5
求二爷的高频题

【在 f********4 的大作中提到】
: 二爷总结那个leetcode高频题挺靠谱的
: 时间来不及可以照着频率高的刷

avatar
n*e
6


tree

【在 a********9 的大作中提到】
: 之前稍微收集了一下
: glassdoor
: ===================
: edit distance
: level traverse tree(高频)
: 1) Calculate the square root of a double(高频)
: 2) Given n intervals [si, fi], find the maximum number of overlapping
: intervals.
: 3) Print all the paths from root to every leaf in a binary tree.
: 4) Print the sum of all the numbers at every vertical level in a binary tree

avatar
A*c
7
赞。请问一下大概是从什么时候到什么时候的?

tree

【在 a********9 的大作中提到】
: 之前稍微收集了一下
: glassdoor
: ===================
: edit distance
: level traverse tree(高频)
: 1) Calculate the square root of a double(高频)
: 2) Given n intervals [si, fi], find the maximum number of overlapping
: intervals.
: 3) Print all the paths from root to every leaf in a binary tree.
: 4) Print the sum of all the numbers at every vertical level in a binary tree

avatar
c*p
8
mark
avatar
d*n
9
多谢,已经转了一些伪币

tree

【在 a********9 的大作中提到】
: 之前稍微收集了一下
: glassdoor
: ===================
: edit distance
: level traverse tree(高频)
: 1) Calculate the square root of a double(高频)
: 2) Given n intervals [si, fi], find the maximum number of overlapping
: intervals.
: 3) Print all the paths from root to every leaf in a binary tree.
: 4) Print the sum of all the numbers at every vertical level in a binary tree

avatar
a*9
10
谢,btw我不记得glass door是哪段时间了 我也就大概找了几页

【在 d***n 的大作中提到】
: 多谢,已经转了一些伪币
:
: tree

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。