---------- Forwarded message ---------- Date: XXXXXXXXX, 2013 XXXXXXXXX Subject: Interview prep -- gTech Software Engineer @ Google To: XXXXXXXXXXXXXXXXX Hi XXXXXXXXXXXXXX Congratulations on being selected for Google's interview process! Please mark your calendar. Your Google Hangout video interview is scheduled as follows: XXXXXXXXXXXXXXXXXX GOOGLE PROGRAMMING INTERVIEW TIPS FOR CANDIDATES This type of technical interview requires preparation. Here is some information to help you succeed I recommend that you ask one of your engineering friends to help you practice interviewing via Hangout. Also, please practice coding on a blank Google Doc during the Hangout. During your actual interview: Have your laptop ready, have your Gmail account open, wait for your interviewer to email you a G+ Hangout link, and the interviewer may share a Google Doc with you. Please code in the language that you are the strongest in (Java, Python, or C++). Many of the questions asked in Google interviews are deliberately underspecified and open-ended, because our engineers are interested in your communication skills when solving problems. Think about ways to improve the solution you will present. In many cases, the first answer that you think of may be good, but not the very best solution. Be sure to talk through your thought process about the questions you are asked, as well as your approach to problems and solutions. A brute force explanation is ok; taking time to talk aloud and compose a more efficient solution is better. Ask clarifying questions if you do not understand the problem or need more information. If you cannot produce the working code needed to solve the problem, at least try to conceptually describe the solution. Take advice & hints from the interviewers if they offer it. Do not give up -- work toward the a solution! You might be asked questions in the following areas: -Algorithm Design/Analysis, Algorithm complexity, Big-O notations (run time characteristics of an algorithm) -Coding ability (you will be asked to code on a Google Doc) -Computer Science Theory -CS Fundamentals -System Design -Sorting -Hashtables -Heaps -Binary Trees -Linked Lists -Depth-First Search -Recursion -Graphs -Data Structures -Mathematics -Operating Systems -Open-Ended Discussion (Biggest challenge faced, best/worst designs seen, performance analysis and optimization, ideas for improving existing Google products) -Specifics of your past projects, implementations and how you arrived at your conclusions -Technical facts and knowledge, performance, how to test solutions Here are more details in these areas: 1) Algorithm Complexity: -Big-O, basic big-O complexity analysis, Big-O notations also known as "the run time characteristic of an algorithm." For more information on Algorithms you can visit: http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=alg_index -CS Fundamentals: *Algorithms (https://developers.google.com/university/). TopCoder is a great place to practice (http://www.topcoder.com/) *Searching and sorting *Language syntax and semantics for at least one -- C++, Java or Python *Standard libraries *Concurrency *Design principles *Distributed systems *Optimization *How common protocols work (ex: HTTP) 2) 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. Strongly recommended for information on Coding: Programming Interviews Exposed; Secrets to landing your next job by John Monagan and Noah Suojanen (Wiley Computer Publishing) http://www.wiley.com/WileyCDA/WileyTitle/productCd-047012167X.html -Construct/traverse data structures -Implement system routines -Distill large data sets to single values -Transform one data set to another 3) System Design: http://research.google.com/pubs/DistributedSystemsandParallelComputing.html -Feature sets -Interfaces -Class hierarchies -Designing a system under certain constraints -Simplicity and robustness -Tradeoffs 4) 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. 5) Hashtables: Arguably the single most important data structure known to mankind. You absolutely should know how they work. Be able to implement one using only arrays in your favorite language, in about the space of one interview. 6) Trees: Know about trees; basic tree construction, traversal and manipulation algorithms. Familiarize yourself with binary trees, n-ary trees, and trie-trees. Be familiar with at least one type of balanced binary tree, whether it's a red/black tree, a splay tree or an AVL tree, and know how it's implemented. Understand tree traversal algorithms: BFS and DFS, and know the difference between inorder, postorder and preorder. 7) Graphs: Graphs are really important at Google. There are 3 basic ways to represent a graph in memory (objects and pointers, matrix, and adjacency list); familiarize yourself with each representation and its pros & cons. You should know the basic graph traversal algorithms: Breadth-first search and depth-first search. Know their computational complexity, their tradeoffs, and how to implement them in real code. If you get a chance, try to study up on fancier algorithms, such as Dijkstra and A*. 8) Other data structures: You should study up on as many other data structures and algorithms as possible. 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. Find out what NP-complete means. 9) Mathematics: Some interviewers ask basic discrete math questions. This is more prevalent at Google than at other companies because we are surrounded by counting problems, probability problems, and other Discrete Math 101 situations. 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. 10) Operating Systems: Know about processes, threads and concurrency issues. 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, so know the fundamentals of "modern" concurrency constructs. For information on System Design: http://research.google.com/pubs/DistributedSystemsandParallelComputing.html Here are some sample programming problems: -Top Coder Tutorials (http://www.topcoder.com/tc?module=Static&d1=tutorials&d2=alg_index) Types of algorithm questions Google asks (more C++ focused). If you launch the "Arena" widget and then go to the practice rooms where you can play with the problems in the first/second division as a warm up. -Project Euler (http://projecteuler.net/) -Five Essential Phone Screen Questions by Steve Yegge (Google Engineer) (http://steve.yegge.googlepages.com/five-essential-phone-screen-questions) Here are some books with sample programming problems: -Programming Interviews Exposed; Secrets to Landing Your Next Job (Programmer to Programmer) by John Mongan, Noah Suojanen, and Eric Giguere. Note: this book was highly recommended by several engineers and quite representative of the types of coding questions asked. -Programming Pearls by Jon Bentley. Contains programming questions that get you thinking outside of the box. -Review of Basic Algorithms: Introduction to the Design and Analysis of Algorithms by Anany Levitin. -"Cormen/Leiserson/Rivest/Stein: Introduction to Algorithms" or the CLR textbook. Here are some links with more information on the interview process: -How to Prepare for a Google Tech Interview (http://www.youtube.com/watch?v=oWbUtlUhwa8&feature=youtu.be) -Tips to Interviewing at Google (http://www.youtube.com/watch?v=w887NIa_V9w) -Getting Into Google (http://www.google.com/about/jobs/lifeatgoogle/hiringprocess/) -Google Products (http://www.google.com/intl/en/options/) -The Official Google Blog: Baby steps to a new job by Gretta Cook (Google Engineer) http://googleblog.blogspot.com/2008/01/baby-steps-to-new-job.html If you have any additional questions, please feel free to follow-up with me. I hope this helps! XXXXXXXXXX