Practice 30 Google Software Developer interview questions covering algorithms, system design, and coding challenges.
Question 5 of 30
How to Answer
Example Answer
Community Answers

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
Having a favorite programming language tells a lot about the experience and expertise level of a software developer. There are numerous languages to pick from, and depending on what applications you are working on and what you intend to achieve, some might work better than others. The Google hiring manager might start with a question about your favorite language and then move to your approach and possibly your methodology or reasoning for favoring that language. Let me give an example of how this question might be answered. If we intend to use Java for this example, we would look at the LRU cache and recently used entries, then remove the element from the bottom and add an element to the start of a LinkedList. Wherever any entry is accessed, it is moved to the top so that recently used entries will reside at the top, and the least used entries will reside on the bottom.

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
"The way I approach implementing an LRU Cache is based on what programming language is used in the development environment. Yes, I do have a preference, but I consider it a tool in a toolbox; I use whatever is available to me to easily adapt my process to the ones used here at Google. Java seems to be a tool of choice in most development environments, and for me as well. Say, for example, we are given total possible page numbers that can be referred. We are also given cache (or memory) size (number of page frames that the cache can hold at a given time). The LRU caching scheme is intended to remove the least recently used frame when the cache is full, and thus a new page is referenced which was not in the cache before. Examples of this approach and method are referenced in the Galvin book."

Interview Coach
Jaymie
A real coach, not AI. I read every answer myself and write back with personalized feedback.
Typically responds within 24 hours.
0 - Character Count
Prepare with questions that reflect Google's rigorous technical interview process.
Get StartedJump to Question

Written by William Swansen
30 Questions & Answers • Google

By William

By William