w*********4 发帖数: 832 | 1 Leetcode刷了一遍不到,年纪大了脑子不好用了,大家看个笑话就好。
F电话:
小印:Validate BST 秒过
Onsite:
1.编程,老印:Given a list of intervals A and one interval B, find the least
number of intervals from A that can fully cover B。早上脑子不清楚,答的很屎。
2.设计,亚男:设计Instagram。感觉尚可。
吃午饭。
3.老白:聊过去Project,最后来一个BFS算每层平均值,应该答的还可以。
4.编程,白男:先写一个DateTime,应该问题不大。然后是Given a list of strings
and an input string with wildcard (e.g. A?? or B?A?), check if the list
contains the input。用Prefix tree直接上,答的还可以。
5.喝咖啡30分钟,毛妹。
6.怎么tm又来一轮设计,完全没想到,而且是两个人,亚男+三哥,三哥主问。问题忘
了,大概是和Social network有关,口干舌燥,答的很屎。
最后是悲剧,HR说strong feedback,自我安慰一下。
L电话:
Nested Integer,正序秒过,反序基本乱写的。最后时间不够了,让我随便答一下复杂
度。
Onsite:
1.HM聊project,没什么新意。
2.老印直接一道DNA Sequence加强版,要升序打印所有不同的长度为10的序列。说来惭
愧这题的基本版187我当时看答案都看不下去,直接跳过。答的很屎。
3.吃饭。
4.老中Tech comm聊project。
5.老中Word Ladder,做的还凑合。
6.设计,top N trending,答的很屎。
结果还没出,估计也是挂。 |
J*******o 发帖数: 741 | |
D***o 发帖数: 4304 | 3 你说的逆序Nested Integer是这个?
364 Nested List Weight Sum II
祝马上有大offer
least
屎。
strings
【在 w*********4 的大作中提到】 : Leetcode刷了一遍不到,年纪大了脑子不好用了,大家看个笑话就好。 : F电话: : 小印:Validate BST 秒过 : Onsite: : 1.编程,老印:Given a list of intervals A and one interval B, find the least : number of intervals from A that can fully cover B。早上脑子不清楚,答的很屎。 : 2.设计,亚男:设计Instagram。感觉尚可。 : 吃午饭。 : 3.老白:聊过去Project,最后来一个BFS算每层平均值,应该答的还可以。 : 4.编程,白男:先写一个DateTime,应该问题不大。然后是Given a list of strings
|
l**g 发帖数: 133 | |
w*********4 发帖数: 832 | 5
没高级账户看不到,看了答案应该就是这个。
【在 D***o 的大作中提到】 : 你说的逆序Nested Integer是这个? : 364 Nested List Weight Sum II : 祝马上有大offer : : least : 屎。 : strings
|
D***o 发帖数: 4304 | 6 核心思想一句话:Weight is defined from bottom up
Different from the previous question where weight is increasing from root to
leaf, now the weight is defined from bottom up. i.e., the leaf level
integers have weight 1, and the root level integers have the largest weight.
thx
【在 w*********4 的大作中提到】 : : 没高级账户看不到,看了答案应该就是这个。
|
f******8 发帖数: 93 | |
m**********s 发帖数: 518 | |
p********n 发帖数: 3367 | |
z*********n 发帖数: 1451 | 10 Given a list of intervals A and one interval B, find the least
number of intervals from A that can fully cover B
这题直接贪心就可以吧?
排序后,找到所有能cover B的起点的interval里终点E最靠后的那个,然后再找所有能
cover E里终点最靠后那个,然后一直找到能cover B的终点的那个. |
h****n 发帖数: 1093 | 11 应该能work,不过复杂度太高了
估计面试官想用interval tree啥的
【在 z*********n 的大作中提到】 : Given a list of intervals A and one interval B, find the least : number of intervals from A that can fully cover B : 这题直接贪心就可以吧? : 排序后,找到所有能cover B的起点的interval里终点E最靠后的那个,然后再找所有能 : cover E里终点最靠后那个,然后一直找到能cover B的终点的那个.
|
r****7 发帖数: 2282 | 12 都是nlgn的复杂度吧,除非说要有很多次query
【在 h****n 的大作中提到】 : 应该能work,不过复杂度太高了 : 估计面试官想用interval tree啥的
|