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
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
s*s
4 楼
谢谢分享
n*e
6 楼
赞
tree
【在 a********9 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
tree
【在 a********9 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
A*c
7 楼
赞。请问一下大概是从什么时候到什么时候的?
tree
【在 a********9 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
tree
【在 a********9 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
c*p
8 楼
mark
d*n
9 楼
多谢,已经转了一些伪币
tree
【在 a********9 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
tree
【在 a********9 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 之前稍微收集了一下
: 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
相关阅读
果子家的模拟IC 能拿到16-17W吗关于去金融公司做软件 我给大家讲一个真实的故事求稳搬家费 不同方式英文怎么说来的?研究生期间TA/RA工作都必须在申请工作时填写?每天下班都不想说话 怎么破GE 发电厂的吗工职位前途如何?google这样的招聘方式还是很先进的啊血汗工厂富士康来美国建工厂了请教linkedin如何计算那个谁看了你的profileprivate company 的利弊早就说西雅图是宇宙中心呗现在大家都在哪里交流面经?特别是各种小公司的印度的国术曲棍球 (转载)真正的一线公司就是FG吧?题刷的太熟练容易招人恨好多小刘自费来美国学计算机, 然后毕业又找不到工作现在G是不是先team match然后过HC?想辞职面试,每天开车两小时,太远了Vp配单间,方便搞秘书。码工配单间工作辞了,决心转码