直通硅谷每日面经整理
为了帮助小伙伴们更好的准备面试
直通硅谷帮助大家整理了每日最新面经
省去自己搜索面经的繁琐
重点标红! 我们每天都更新哦!
整理时间
2020年5月下旬
本期内容
以下公司最新面经速递
eBay | |
快手 | 京东数科 |
部分面经阅读
(因为整理内容过多,这里只放有部分面经,想获取完整版的小伙伴们可以阅读下文“完整版获取方式”。)
前天面的ebay, 印度小哥,先问了几分钟project,又考了三道题
第一题. LC12. Integer to Roman, 写了完整代码,分析了time complexity
第二题. Best Time to Buy and Sell Stock III, 说了思路,写了完整代码,分析了time complexity
第三题. Best Time to Buy and Sell Stock IV 这题写了基本的dp induction rule和填表顺序,没时间写代码了
来源:
https://www.1point3acres.com/bbs/interview/ebay-software-engineer-471299.html
· Status: BS, 5+ Yoe in Tier-1 Company (In Japan), Top University in Japan
· Position: Software Engineer (L4)
· Location: Japan
· Date: Feb 2020
· I just want to start by saying big thanks to Leetcode and the community here. I felt it is a much more fair game now, since everyone can access the same amount of resources.
1. Background
· I was contacted every year by Google recruiter for several years, but I loved my job and refused every single time. Until late last year, I think I needed a change and proactively contact the recruiter who approached me before. I told her I am ready to apply but need some time to prepare. She told me to prepare first and then let her know 1 month before I was ready for phone interview.
2. Preparation
· I started my preparation around October. I used Leetcode for practicing, Geeks4Geeks for refreshing, CLRS+Algorithms (Sedgewick) for references, educative.io for System Design. I really love math and algorithms, so it was really enjoyable.
3. Technical Phone Screen
· After 1,2 months (December), I got my phone interview scheduled on January. I still have another month to prepare, but I feel pretty confident at this point.
· The interviewer went straight to ask a programming question. One was related to tree traversal (similar to LC Medium), which I solved in 10 minutes (concise+fast). He then moved on to ask an LC Hard level problem. I have never seen it before, but I figure out I need to use Line Sweep, so I coded and made it work. I missed on edge case, but I noticed it myself and was able to partilly resolve that.
· 8AM the next morning, I received an email from my recruiter to schedule a phone call from 9AM, and the wording really sounded like bad news. I searched on Blind "Google phone interview call the next day" or something like that. More than half said it was bad news, and I was really confused, since I thought I did OK. Thankfully, the recruiter just tried to talk to me to make sure my experience matched the feedback, which was positive.
4. Onsites
· 3 coding interviews + 1 System Design + 1 Googliness
· 1st, I was asked to code in Laptop so the interviewer didn't need to note my code :). I didn't know I would have other choice other than the whiteboard, but I was happy to accept. He started with a very basic question, then follow up, then another follow up (anyone knows graph would be able to crush these questions easily). He then asked me another question, kind of strange question, I think I was able to analyze and made a working solution (probably not optimal), but I think he was happy with it since it was only 10 minutes left.
· 2nd interview was Googliness, so you know, a bunch of behaviors.
· 3rd interview is another coding, he started by asking an LC-Easy question, I made it work in 10 minutes including testing time, so he moved on to ask an LC-Medium question. I explained the logic, how I would do it, he clearly knew that I was in the right track, so he told me no need to code, and keep asking follow up questions (generic, thread safe, etc).
· 4th interview, so far, the only one I felt challenged. It was a very interesting question, which I never seen before (not similar to any LC I know). After analyzing it, I was able to come up with the solution by using Graph (It's Google, prepare for GRAPH) representation and cycle detection. I barely finished coding before time, and we tested it together, and the interviewer told me it was correct (so nice of him, some interviewers won't tell you if you're wrong or correct).
· 5th interview was System Design, I was worried about this as I don't really know what to expect. However, I was so lucky, he asked me a question that I knew so well that after 15 minutes asking, he litterlly told me that he would give up asking this question (since he realized that I knew too much) and switch to another one. The next question, is again, something I built before, so I was able to come up with a workable design and answer all follow up questions.
5. Results
· I was called by my recruiter 2 hours after my interview and she told me the initial feedback was very positive, with zero red flag, so she will move my application to HC asap. Since I got a competing offer, she also asked me if I want to talk to someone from Google to help me better make my decision. I told her I wanted to talk with a manager, but not too high level person, but someone who manages a small team, and she happily agreed.
· I got the offer as L4 (strong L4, said my recruiter). The feedback was: My system design went very well, but the question itself is not big enough to justify me as L5. I guess I have never had chance to actually aim for L5 anyway, since what else I could do if it's because of the question :(. Anyway, I really did what I could.
6. Tips For Coding
· I did a crazy amount of LC, 613 Mediums, 213 Hards (in 3 months). I would say 70% medium and 50% of hard I could do by myself, the rest I need to read the solution or hints or discussion. I know lots of people do a lot less and still pass, but I just wanted to make sure I prepared the best that I can. I learned a lot, probably too much. Some of my favorite topics are: Segmented Tree, Line Sweep, Cycle Detection, Sliding Window.
· I started with Medium. At the beginning, I struggled a lot, but still be able to solve around 2 medium in one hour. Then after I solved around 2,3 hundreds of those, things change. During my vacation, I just keep coding, and was able to solve 25 mediums/day. I kept pushing myself for that speed, sometimes I would stay up late just to maintain it. As for hard, I did by category, start with those I am most confident with: Tree+Graph+LinkedList+Stack. I read books and geeksforgeeks article, Leetcode discussion and official solution. I master all graph algorithm (mst, shortest path, dfs, toposort, cycle detection), I can literally code those without even think. Next I move on to the really hard ones, those tricky problems. Honestly speaking, I did those just in case and I also wanted to learn, but I really doubted I would see any in actual interview. I skipped dozens of hard problems such as Design Skiplist, who would ask that?
· 1,2 weeks before onsites, I made a bunch of lists to keep track of problems I want to check again or I need to finish before the interview. I scanned through ALL problems in Algorithms section (>1000), including Easy, Medium, Hard. Then I classified those to: A-Easy Problem (according to me, not LC), B-Problem I know exactly how to solve, but I prefer to revisit again, C-Problem that I certainly need to revisit. Put B and C in one list or separated lists I repeatedly do the process for a week. I did around 5,6 iterations. Each time, the size of those lists subdue. From the whole algorithms section (>1000), at the end, I think I had a list called "2020-ALastTime" containing around 20 hard problems. I skimmed through that list the morning I had Google onsites.
· Try mock interview with LeetCode premium. It helped me prepare mentally for actual interview. I felt the time constraint and always pushed myself. My overall score in October was 5.5, and now, it is 9.4. Two weeks before the onsite at Google, I did 10 Google onsites (normally 2 mediums+1 hard), average time to complete is about 40 minutes. The high score is kind of cheating, since at the time I started to do mock again, I already finished "a lot" of hard + medium problems. Still, I felt I made some progress.
· Try to code fast and concise. It will make it a lot easier to impress in an interview, since the faster you code, the more time you can think.
· Try to really really understand a solution. Try to classify what techniques should be used in what problems. I think this is the skill that will make you thrive in an interview. At the end, you will most likely meet a problem you never met before.
· Always read the solution even if you can do the problem yourself. You can find something new!
· Answer the coding question itself is very important, but follow-ups will be a big factor as well. I was asked many follow-ups in my >10 interviews in 2020, it can range from checking your understanding about data structure (tree, list, stack, queue) or to more engineering specific such as deadlock, threadsafe, generics, operating system. Follow-ups are exceptionally important in System Design interview.
7. Tips For System Design
· Grokking The System Design Interview was the one I used the most, but each session was too long. I have gained a lot of knowledge from that course, but I disagreed with their lengthy, lack of focus approach. Still, it is worth the money I paid for, but I am not sure if everyone will feel the same.
· For a system design question, I recommend a direct approach, go straight to the points the company you're interviewing for cares about. For example, if availability and reliablity are critical, then talk about how you will monitor the system you design, how to handle failure, replication. If knowledge about database is important, then know SQL, No-SQL, Wide-Column DB. I I know for sure Amazon and Google recruiters will send candidates document talking about their expectation.
· At the end, System Design interview will most likely start with a simple question, then a bunch of follow-ups. Answering the follow-ups with confidence and expertise is the key for success. I believe experience matters as much as preparation for System Design.
8. Others
· Take a long vacation! I used 35 days off (with good excuse, and not continuous) + Winter vacation.
· Buy a big WHITEBOARD at home!!! That's the first thing I did in October.
· I already have a competing offer in hand, so the process from onsites for me is very fast. I'd recommend everyone has a competing offer before doing interview with FAANG, even it actually cannot compete financially, it may help to speed up the process. The team matching for me started even before HC result comes out.
· Big thanks again and good luck to everyone!
9. References
· Books: Introduction To Algorithms, Algorithms (Robert Sedgewick), Cracking the coding interviews
· https://leetcode.com/interview/
· https://leetcode.com/tag/line-sweep/
· https://www.educative.io/courses/grokking-the-system-design-interview
· https://www.geeksforgeeks.org/
来源:
https://leetcode.com/discuss/interview-experience/505108/NDA-Google-or-L4-or-Japan-or-Feb-2020-Offer
一面:
自我介绍
项目介绍
打开url的过程
http和tcp的区别
tcp和udp的区别
https过程
redis为什么快
redis持久化过程
redis用了那些持久化
CAS底层实现
你在什么时候使用过CAS
AQS讲一下
集合都用那些 hashmap底层实现
事务隔离级别
索引为什么使用B+树
三个单例模式 懒汉(线程安全线程不安全)+双检索
反转链表
合并区间
当时http问题都问的挺深的(问了我好多http的问题 我不太记得了就记得一些) 但是太深的我也没答上来 我主要是代码写得特别快 没出什么问题
当时五十分钟一面之后就直接通知我二面了
二面:
自我介绍项目介绍
集合介绍
hashmap底层实现
hashmap扩容过程
hashmap扩容为什么是2倍不是3倍
红黑树的特征
为什么使用红黑树
什么时候转成红黑树
什么时候红黑树转成链表
为什么在8的时候转红黑树
8的意义是什么是hash冲突还是桶的个数
concurrenthashmap底层实现
concurrenthashmap是如何保证线程安全的
几乎hashmap所有能问的都问了一遍,。。可能我记得不全。。但是肯定比这个多。
然后说好 那我们写个hashmap吧。
来得太突然。。我当时快哭了。。 还好写上来了
写了get put rehash expand 还有一些细节都谢了 然后出了点问题
讨论了好久
然后告诉我让我跟hr约接下来的事情
HR:
问了我一下为什么选择快手
平常使用快手吗
然后还有就是 在外企和互联网公司是如何选择的
为什么这么选择
什么时候上班之类的
优点缺点 还有一些我忘了
后来给我发微信说要加面 leader
三面:
本来跟我说没有三面了后来又加了一个leader面试
写了一个很简单的算法 我当时先说了一下两种思路
有一个hashmapAPI用的不熟 本来想用没写的太好
但是他说他理解我的意思了
然后问了我一下疫情的事情
问我缺点是什么
问我如何判别效率和代码简洁性
然后问了我两个东西这两个用起来那个cpu运行得更快
我真的不知道。。 但是这俩我老用 就是没看过源码不知道 快慢是怎么判断的
反正三面的leader特别好 一直在引导我 耐心的指点我
还跟我说了一些很有用的学习上的建议
然后我就通过了 拿到了口头offer现在在等 offer
总的来说 我是幸运的
来源:
https://www.nowcoder.com/discuss/374926?type=2&order=3&pos=12&page=1
1.自我介绍
2.栈、堆和方法区的介绍
3.Java中的内存溢出介绍一下
3.线程池的五种状态,结合例子说明在什么情况下或使用什么方法进入什么状态
4.http请求
5.tcp如何保证可靠性(重传机制和滑动窗口)
6.Linux中的五个主要命令
7.Java中的IO是如何实现异步的
8.synchronized关键字
9.JavaScript是单线程还是多线程,如何保证异步
10.域
11.ping使用什么协议
12.git了解吗,它有几个仓库,介绍一下
13.你有什么想问我的
来源:
https://www.nowcoder.com/discuss/363912?type=2&order=3&pos=19&page=2
完整版领取方式
没看过瘾?到处求米只为一篇面经?自己翻找面经太耗时?这里一次让你看个够!让你的科技求职变简单不是白喊的!直通硅谷公众号每日发布最新面经,赶快置顶吧!更有按公司整理的面经大全让你一次到位!
领取方法:
扫码添加小助手,回复“面经+公司名”
得到最新面经汇总!
每天不断更!不止这些哦~
最新面经看了,可答案不确定又该怎么办?
求职准备苦,找直通硅谷
Offer又被撸,找直通硅谷
直通硅谷成立4年多以来,已累计帮助2500+学员拿到心仪offer!
依托硅谷顶尖科技公司资深工程师教师资源,针对华人学生面试短板,打造精悍高效、高技术含量且紧贴面试趋势的求职辅导课程,帮助学员提高硬核能力、熟知面试技巧,拓展职场人脉,从而进入硅谷顶尖科技公司。
课程详细介绍请点击↙左下角原文链接~
求职文书资料:25万字四年积累资料库,包含求职文书模板、面经资料、BQ资料等,让同学在求职的前、中、后期大大节省资料搜集时间。