Prepare for Your Google Interview: Coding

You’ve done it. You’ve landed an on-site interview with Google. Congratulations! My fellow Googlers and I would like to share our tips and advice on how to prepare. In this video, we’ll cover communication and collaboration, creating algorithms
and using data structures, writing clean and structured code, testing and error checking, and overall best practices. Communication and collaboration are incredibly important in the work we do here at Google. And that’s because it’s key to how we approach developing and building our products. In your interview, it’s important to demonstrate these qualities. Understanding a problem, designing a solution, and writing code are all
valuable parts of the interview process. We want you to think out loud. We don’t just want to see the final code. We want to understand how you arrived at it. Google is a collaborative workplace where projects are planned and executed by teams. Those teams have a mission to work together to solve big,
often ambiguous problems, not just write code. And those problems can have multiple valid solutions. So, tell us your plan on how to solve these problems and be sure to ask questions. And remember: we’re not looking for one specific answer. Some of the problems you’ll encounter during your interview will be deliberately underspecified. We leave those questions open ended because real engineering
problems require you to dig deeper. At Google, we deal with planet-scale data and compute systems every day. Simply identifying a solution isn’t always enough. The code we write needs to be fast enough to respond to users
and make efficient use of our resources. You should have a strong understanding of commonly used algorithms and data
structures to do just that. When you’re presented with a problem, it’s probably a good idea to outline the algorithm
and discuss it with your interviewer before you jump into the coding. It will give you an opportunity to refine and improve your solution collaboratively
with your interviewer. Understanding the computational complexity of your solution is also important. Remember, you don’t have to come up with the optimal solution up front. Iterating to improve your solution can be a valuable part of the process. You’re also going to want to use appropriate algorithms and data structures. You should have a strong fundamental understanding of commonly used data structures
like: arrays, linked lists, stacks, and queues. You’ll want to know sets, maps, trees, heaps, and graphs as well. It’s also essential to know which algorithms tend to go along with each data structure. Algorithms that are used to solve Google problems typically include: sorting, searching,
and binary search. You should also be familiar with divide-and-conquer, dynamic programming
and memorization, greedy algorithms and recursion. And be sure to brush up on algorithms linked to specific data structures
like graph traversal. You won’t be expected to answer questions requiring some obscure
and highly domain-specific algorithm. You won’t be expected to answer questions requiring some obscure
and highly domain-specific algorithm. When you’re working out the requirements of an algorithm,
this could also be the perfect time to think of good test inputs. At Google, developers may work across different platforms,
but the foundational knowledge required to perform their job functions is the same. Candidates will be expected to write idiomatic code in a programming language
and style they are comfortable with. Common languages candidates choose to write code in include: C/C++, Java,
Python, JavaScript, or Go. Choose the language you are comfortable with. We are evaluating you on conceptual understanding. And we know that if you’re fluent in one programming language, you could learn another. We also aren’t trying to confuse you with language trivia. So don’t worry too much about memorization, syntax or punctuation. We want the substance of your code to shine through. Google’s products and services are important for billions of people around the world. When we make changes, we need to be confident that we’re not breaking important
existing features. After you’re finished coding in your interview, you’ll want to run through at least one
or two test cases to check your work. Good test inputs should exercise the boundary conditions in your inputs and your algorithm. Use simple and compact sample inputs first to ensure your code is correct. And lastly, you may also be asked to discuss malformed inputs and
how your code handles them. Now that you have the focus areas, here are some overall best practices to
keep in mind for your actual interview day. We want to understand how you think, so it’s important to explain your thought process
during the interview. We’re not only evaluating your technical ability but also how you solve problems. Many questions will be deliberately open-ended to give us an idea of how you think. We’d encourage you to ask for clarification. And we all know that our first solution may not be the best one. So, once you’ve come up with an answer to a question, think about ways to improve upon it. Let your interviewer know what you’re thinking. And lastly, practice on paper or a whiteboard. You may have the option to use a computer and/or whiteboard during your interviews, so you’ll want to make sure you practice for both possible options and that your code is easily readable if written. And those are our tips to help you prepare for a coding interview at Google! If you have any questions about your upcoming interview, you can always reach out to your recruiter. We’re here to help. And we look forward to seeing you at one of our offices around the world soon.

Leave a Reply

Your email address will not be published. Required fields are marked *