亲!马上注册或者登录会查看更多内容!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
最近在刷面经,总结了各种论坛上面的面经。 f家的原题挺多的, 自己明天面试,,希望顺利!!求rp rp rp只有数字的就是 lc 题号了。1 c. H9 b% y1 I- A& y
% X9 W2 U0 v5 x; F7 R b
) D1 _+ X% z( a! _ K6 y i6 w5 A: h0 }4 |! ?1 C
manager célébrity problem 判断non-negative array里面是否有subarray之和等于k 面经高频,离某点最近的k个点。我看到 面试官示例的时候给定点在集合之中,就没问。结果他的意思是给定点不在集合之中,估计这里也扣分了。 股票1 股票2变形,每次交易都要收费。 给一个set,求有多少个subsets,里面的min和max之和小于k。 Best Time to Buy and Sell Stock
; d: H! s7 L5 f, e0 {向量dot product, 内存放不下 304 lc463 257 (space o(1) )21,23,88 subset dfs的call stack是多少, add binary-> list of string
T" \2 {* y8 i& c/ E1 P2 Binput: two bst. from: 1point3acres.com/bbs output:print all elements in those two bsts in sorted form Kth Nearest Points to the Origin // to be figure out 348 221 38 278 78 90 46 47 move zeros LC 314 Binary Tree Vertical Order Traversal
1 `/ L7 T# V! h1 X* K+ @& ODecode ways
" v! F; p; b: @2 k- k; BMove Zeros
$ O# ?4 ]. ~9 Dedit distance
" D& u5 H5 ]# A$ Icombination sum
$ t9 s% u' c( l0 {+ \5 y5 L6 A" ~0 ~reverse linked list ) V6 t7 N: s; R/ {: j
1. isPalindrome(). 用了recursion 2. Number of Island, find the maximum size of islands. 说union find 和 dfs可以,问了下区别,回答了union find可以避免dfs的stack overflow,时间上可能慢一点点,最后用union find做了。问了下为什给的graph是二维的,union find里的parent数组要映射成1维的。因为方便迭代寻找parent…
8 U x; _ p+ z9 v( l- }这次是第二轮面试了,碰到了人品爆发,是一个中国女生面的。前面十五分钟互相介绍。然后三十分钟coding题目。题目是Integer to English Word. 其中coding部分基本练过就好。但是有略微区别的是,楼主在编的过程中问到了bound和negative(面试官说可以有negative)的问题,允不允许negative,如果是integer bound的话,在MIN_VALUE转化成正的时候会有溢出。注意这两点。最后就是写test case。所以多准备点test case还是有必要的。 ) u! M; z" O9 h) ~
Add and Search Word
( E ]$ \/ p# u1 v$ |# {* IMinimum depth of binary tree. 问题2: Binary tree vertical order traveral. follow up 是如果树很不平衡怎么办。BFS vs DFS.
; A3 a5 F, M! S. {" u' v9 J1. leetcode 367 Valid Perfect Square dot product array follow-up 依然是之前版上面经提到的 array的size特别大怎么办, memory 存不下怎么办。
; h" c9 R P f7 d- e4 ^, d1. strStr() , 不要求KMP,brute force就行 2. task with cool down 经典面经题 move zero 2. add binary preorder traversal for Binary tree 2. leetcode 314 Binary Tree Vertical... + l* c6 d% ^7 R V) [0 _# p
flatten tree to linked list strStr() ' s- a+ i# F* `& S+ i+ N/ E
leetcode 200, 444 139->140
6 ^1 I" l7 z2 \# i$ r1 `minmum window substring. 第二轮找<<<interval>>>里面出现最多次数的点。第三轮 一百三十九,加follow up.
. W P7 o; Q' _. r: B& u4 c9 X4 `3 w
3SUM reservoir sampling. WordBreak. LC17 0 }" p$ P; {) N7 _5 P
reg expression sparse vector multiplication . _! k) J1 C2 L
Top k T3 N/ B9 H, c' s- L
wildcard search trie
* [; S8 v$ V- |' `6 C; E! UFriends of Friends. 给一个get_friend_list()的API,要求implement一个function,输入是user,输出是,这个user的所有二度好友,并按共同好友数排序。 5 S, R- f) ^# A0 \
2 s \% g( i' ~& b
|