去Google工作!

這個是Steve(據王垠說是Google的一個小頭目,我在“來點互動”那篇文章裏面也寫了他推薦的一些書,見該文的回覆)寫的怎麼樣去Google謀職,裏面有不少實在的建議,給我了不少啓發。我這裏還摘錄他的“技術準備”部分,附上自己的註釋和想法,學過算法和數據結構的話掃一遍就可以了。
原文裏面還有一個很有意思的技巧,那就是帶上白板去面試,除了Steve說的那些好處外,這個肯定會讓你獨樹一幟的!再有就是大家都會忽略的:模擬面試。
 
原文地址:
感謝王垠的推薦。

我就拷貝了正文的一部分,感興趣的童鞋請閱讀原文吧,文章開始的風格很有意思!
 
——我會摻雜一些簡單翻譯和自己的思路,就當作點註釋:)不過我不保證和原文的思想保持一致,絕對不保證!因爲——我會用我自己的風格來註釋,我將會揉合原汁原味的時間夥伴風格進去!
 
Tech Prep Tips
 
//嗯,最簡單以及直接的祕訣還是去讀個該死的計算機學位
The best tip is: go get a computer science degree. The more computer
science you have, the better. You don't have to have a CS degree, but
it helps. It doesn't have to be an advanced degree, but that helps
too.
//對對對,從現在纔打算去搞個學位證,讀出來鬍子都白了,於是Steve就給了一些捷徑,當然以及毫無疑問地...他們都圍繞了算法和數據結構————畢竟Google不打算招募一羣代碼工人,and,我絕對沒有鄙視worker的意思 - -!
 
However, you're probably thinking of applying to Google a little
sooner than 2 to 8 years from now, so here are some shorter-term tips
for you.
 
//好了以下開始進入正題,首先登場的自然是我們的大O...
Algorithm Complexity(算法複雜度): you need to know Big-O. It's a must. If you
struggle with basic big-O complexity analysis, then you are almost
guaranteed not to get hired. It's, like, one chapter in the beginning
of one theory of computation book, so just go read it. You can do it.
//這些口水細節我真的懶得翻譯了,如果你真的想補下課,就去找點書來好好讀讀,做點習題吧;如果你是剛入門,就去讀那本數據結構與算法分析(C語言描述),強烈建議你讀C語言描述的而不是C++描述的。因爲那樣會讓你的大腦運轉得更多。作者在後面對算法設計也推薦了一本書,請留意;還有就是那本經典入門:算法導論,裏面除了算法,還講了很多東西,比如基本和高級的數據結構,相關的數學知識,多是離散數學的,還有就是一些複雜問題,比如NP等等,你可以選讀一下,關於這門課在MIT的開放課上有很詳細的指導,具體細節請參看我的自學補完:[url]http://uneeda.blog.51cto.com/289042/61691[/url],雖說是“我的自學系統”,但實際上裏面給了不少實際的建議,這些建議應該會是和大多數人的。
 
Sorting(排序): know how to sort. Don't do bubble-sort. You should know the
details of at least one n*log(n) sorting algorithm, preferably two
(say, quicksort and merge sort). Merge sort can be highly useful in
situations where quicksort is impractical, so take a look at it.
For God's sake, don't try sorting a linked list during the interview.
兩個最常用的,合併排序和快速排序,他建議我們多掌握一些n*log(n) 的排序算法
 
Hashtables:(哈希表) hashtables are arguably the single most important data
structure known to mankind. You absolutely have to know how they work.
Again, it's like one chapter in one data structures book, so just go
read about them. You should be able to implement one using only arrays
in your favorite language, in about the space of one interview.
掌握哈希表(散列表/函數)同樣是項基本功。我們應該要能夠去應用它才行,不管你要用什麼語言,請學會使用它。
 
Trees(樹啊...樹): you should know about trees. I'm tellin' ya: this is basic
stuff, and it's embarrassing to bring it up, but some of you out there
don't know basic tree construction, traversal and manipulation
algorithms. You should be familiar with binary trees, n-ary trees, and
trie-trees at the very very least. Trees are probably the best source
of practice problems for your long-term warmup exercises.
You should be familiar with at least one flavor of balanced binary
tree, whether it's a red/black tree, a splay tree or an AVL tree. You
should actually know how it's implemented.
You should know about tree traversal algorithms: BFS and DFS, and know
the difference between inorder, postorder and preorder.
You might not use trees much day-to-day, but if so, it's because
you're avoiding tree problems. You won't need to do that anymore once
you know how they work. Study up!
你總得知道數的一些基本知識吧,遍歷,操作和應用,樹在實踐中是很常用的,大家必須要熟練掌握,噢,他說我們要做好長期熱身練習...呵呵!
在最讓人鬱悶的情況下,你都得掌握二叉樹,N元樹,二叉查找樹,伸展樹;
其餘時候(嘿嘿!),要熟練至少一種均衡二分樹,不管它是一個紅黑樹, splay樹或AVL樹。你要真正懂得這類高級數據結構的實現。
 
還有就是遍歷算法啦:深度優先和廣度優先是最基礎的啦!還要會區別中序,後序,先序和層序。
 
Graphs(圖圖圖圖圖圖)
Graphs are, like, really really important. More than you think. Even
if you already think they're important, it's probably more than you
think.
There are three basic ways to represent a graph in memory (objects and
pointers, matrix, and adjacency list), and you should familiarize
yourself with each representation and its pros and cons.
You should know the basic graph traversal algorithms: breadth-first
search and depth-first search. You should know their computational
complexity, their tradeoffs, and how to implement them in real code.
You should try to study up on fancier algorithms, such as Dijkstra and
A*, if you get a chance. They're really great for just about anything,
from game programming to distributed computing to you name it. You
should know them.
Whenever someone gives you a problem, think graphs. They are the most
fundamental and flexible way of representing any kind of a
relationship, so it's about a 50-50 shot that any interesting design
problem has a graph involved in it. Make absolutely sure you can't
think of a way to solve it using graphs before moving on to other
solution types. This tip is important!
圖的重要超過了我們的想象!
首先你要知道他的不同表示法,就是鄰接表和矩陣那些...
r然後你應該知道的基本圖遍歷算法:廣度優先搜索和深度優先搜索。還有他們的複雜度,tradeoffs(權衡?哈哈我不知道這個是講的啥...請大家指正一下!),以及如何具體實現,代碼級別的。
有時間再研究下fancier algorithms(該死...花式算法,不知道做何解,彷彿只可意會吶),如Dijkstra的和A *,因爲你可能會有機會接觸到分佈式計算
 
Other data structures(其他數據結構)
You should study up on as many other data structures and algorithms as
you can fit in that big noggin of yours. You should especially know
about the most famous classes of NP-complete problems, such as
traveling salesman and the knapsack problem, and be able to recognize
them when an interviewer asks you them in disguise.
You should find out what NP-complete means.
Basically, hit that data structures book hard, and try to retain as
much of it as you can, and you can't go wrong.
這個就是一些研究問題,比如NP完全問題,一些典型就是旅行商問題和揹包問題了。
 
Math(數學)
Some interviewers ask basic discrete math questions. This is more
prevalent at Google than at other places I've been, and I consider it
a Good Thing, even though I'm not particularly good at discrete math.
We're surrounded by counting problems, probability problems, and other
Discrete Math 101 situations, and those innumerate among us blithely
hack around them without knowing what we're doing.
Don't get mad if the interviewer asks math questions. Do your best.
Your best will be a heck of a lot better if you spend some time before
the interview refreshing your memory on (or teaching yourself) the
essentials of combinatorics and probability. You should be familiar
with n-choose-k problems and their ilk – the more the better.
I know, I know, you're short on time. But this tip can really help
make the difference between a "we're not sure" and a "let's hire her".
And it's actually not all that bad – discrete math doesn't use much of
the high-school math you studied and forgot. It starts back with
elementary-school math and builds up from there, so you can probably
pick up what you need for interviews in a couple of days of intense
study.
Sadly, I don't have a good recommendation for a Discrete Math book, so
if you do, please mention it in the comments. Thanks.
這個不講多了,主要就是要求一些基本的離散數學能力,如計數和概率,在《算法導論》第八部分會讓你做一些回顧的。順帶推薦,也是再再再再強調的,SICP(計算機程序的構造與解釋)!
 
Operating Systems
This is just a plug, from me, for you to know about processes, threads
and concurrency issues. A lot of interviewers ask about that stuff,
and it's pretty fundamental, so you should know it. Know about locks
and mutexes and semaphores and monitors and how they work. Know about
deadlock and livelock and how to avoid them. Know what resources a
processes needs, and a thread needs, and how context switching works,
and how it's initiated by the operating system and underlying
hardware. Know a little about scheduling. The world is rapidly moving
towards multi-core, and you'll be a dinosaur in a real hurry if you
don't understand the fundamentals of "modern" (which is to say, "kinda
broken") concurrency constructs.
The best, most practical book I've ever personally read on the subject
is Doug Lea's Concurrent Programming in Java. It got me the most bang
per page. There are obviously lots of other books on concurrency. I'd
avoid the academic ones and focus on the practical stuff, since it's
most likely to get asked in interviews.
這個也不多說了,就是進程,線程和併發問題。因爲我們正走入多核時代,然後他介紹了一本書,Concurrent Programming in Java ,即.Concurrent Programming in Java ,Doug Lea
Java 併發編程:設計原則與模式
[url]http://www.douban.com/subject/1244021/[/url]
這方面的研究,我想除了看Linux內核以外,還應該關注集羣,包括Google的一些實現,比如他的GFS,MapReduce和BigTable等,當然研究beowulf集羣的同時,還可以看看skeletion(MapReduce就運用了其中最簡單一種實現),當然要是對學術感興趣的話你可以對skeletion深入下去,給個老巢,[url]http://homepages.inf.ed.ac.uk/mic/Skeletons/[/url] ,這裏不再深入,因爲這超出了這篇文章講的範圍,以後有時間我會撰寫相關的文章的。我的最後一點建議是,看看Hadoop! 以上,請自己Google一下!
Coding
You should know at least one programming language really well, and it
should preferably be C++ or Java. C# is OK too, since it's pretty
similar to Java. You will be expected to write some code in at least
some of your interviews. You will be expected to know a fair amount of
detail about your favorite programming language.
這個地方真是鬱悶,講的這麼少,我就自己講一下吧,coding的時候請注意一些技巧的掌握,比如遞歸轉迭代,這些都是很有用的東西,在面試的時候會對你的編程習慣和技巧做一個考察,還有一些基本能力,比如指針和內存管理,當然如果你只學Java的話,你就得錯過這些美妙的東西了,雖然他們宣稱垃圾回收機制把你解放了,但實際上Java這類語言有時候也把我們的能力給“封裝”起來了,在你真正進入要求效率工程界之前,還是請你熟練掌握他們!至少它們會讓你的頭腦保持靈活並熟悉一些底層的操作.同時請學習一些函數式語言(比如Lisp),他們真的很有用,請相信我!
 
 
Other Stuff
Because of the rules I outlined above, it's still possible that you'll
get Interviewer A, and none of the stuff you've studied from these
tips will be directly useful (except being warmed up.) If so, just do
your best. Worst case, you can always come back in 6-12 months, right?
Might seem like a long time, but I assure you it will go by in a
flash.
The stuff I've covered is actually mostly red-flags: stuff that really
worries people if you don't know it. The discrete math is potentially
optional, but somewhat risky if you don't know the first thing about
it. Everything else I've mentioned you should know cold, and then
you'll at least be prepped for the baseline interview level. It could
be a lot harder than that, depending on the interviewer, or it could
be easy.
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章