Monday, December 24, 2012

My Book "Coding Interview: Questions, Analysis & Solutions" Was Published

Thanks to the readers of the blogs, whose encouragement helped me make the decision to write a book on coding interviewers. Now the book "Coding Interviews: Questions, Analysis and Solutions" has been published by Apress, and the cover page is shown as below.
The detailed information about this book is available on the Apress website. Additionally, we may also find this book in

Summary of Chapters

The first chapter focuses on the interview process. A typical interview process can be divided into two phases: phone interviews (including phone-screen interviews) and on-site interviews. Usually there are three steps in each round of interview, which are the behavioral interview, technical interview, and general Q/A. Tips are provided for each stage of interviews.

The next three chapters cover basic programming knowledge. Technical interview questions on four popular programming languages (C, C++, C#, and Java) are discussed in Chapter 2. The most common data structures (including arrays, strings, lists, trees, stacks, and queues) and algorithms (including search, sort, backtracking, dynamic programming, greedy algorithms, and bit operations) are discussed in Chapter 3 and Chapter 4 respectively.

Chapter 5 discusses three factors of high quality code. Interviewers usually expect candidates’ code to fulfill the functional requirements as well as cover corner cases and handle invalid inputs gracefully. After reading this chapter, you should get the idea so that you will write clear, complete, and robust code.

Three strategies to solve difficult coding interview problems are provided in Chapter 6. If hard problems are met during interviews, candidates should figure out solutions before they write code. After reading this chapter, you may get three strategies to solve problems: figures to visualize problems, step-by-step analysis on examples to simplify problems, and divide-and-conquer strategies to break complex problems into manageable pieces.

The topic of Chapter 7 is performance optimization. If there are multiple solutions to a problem, usually interviewers expect the most efficient one. The strategies to improve time efficiency and make trade-off decisions between time and space are discussed with several sample coding interview questions.

Chapter 8 summarizes various skills for interviews. Interviewers usually pay close attention to candidates’ communication and learning skills. Additionally, many interviewers like to examine candidates’ skills of reapplying knowledge, mathematical modeling, and divergent thinking.

Chapter 9 closes this book with two interview cases, which highlight good behavior expected by interviewers and the most common mistakes made by candidates.

 Distinguishing Features

This book analyzes coding problems from interviewers’ perspectives. There are many tips about the expected behaviors in this book, which are based on my own experiences as an interviewer at Autodesk, Microsoft, and Cisco. Moreover, many interview questions have different solutions. This book evaluates various solutions from an interviewer’s point of view. When you read the problem analyses, you will get the idea as to why some solutions are better than others, and you will grasp the capabilities required to the assure the quality of your code through completeness, robustness, and efficiency.

This book not only solves more than 100 interview problems, but also summarizes common strategies to conquer complex problems. When I analyzed and solved dozens of coding interview problems, I found that there are many general strategies that are quite helpful to solve other similar problems during interviews. For example, if an interview problem is quite complex, we may divide it into several small subproblems, and then solve the subproblems recursively. We can also utilize hash tables implemented with arrays to solve many interview problems about strings. Similar problems are grouped in sections in this book. Pay attention to the similarities among problems in a section and the general ideas to solve them. When you meet new but similar problems at your interviews, you may reapply the strategies illustrated in this book.

Sample questions in this book are real interview problems frequently met in the famous IT companies. The coding interview is the most important phase of the whole interview process in many companies, such as Facebook, Google, and Microsoft. The sample questions collected in this book are the most typical ones adopted by interviewers in these companies. Don’t be discouraged when you find that the problems in this book are not easy because interviews in big companies are not easy for most software engineers at first. You will find that there are relatively few problems that truly test the capabilities of programmers in meaningful ways. So, while you may not get a problem directly from this book, you should attain the skills required to handle whatever an interviewer can dish out. When you gradually master the strategies to solve problems summarized in this book, your capabilities to develop code and solve complex problems will be improved, and you will feel confident when interviewed by the Facebooks and Googles of the world.

Source code to solve sample interview problems along with a complete set of test cases to each problem is included. After candidates finish writing code, many interviewers will ask them to design some test cases to test their own code. Some candidates, especially fresh graduates, do not have clear ideas about how to design test cases. When you finish reading this book, you should know how to improve code quality with functional test cases, boundary test cases, performance test cases, and so on.


  1. Replies
    1. Tks very much for your post.

      Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

      You also find all interview questions at link at the end of this post.

      Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

      Best rgs

    2. Merhaba,

      Great post. Well though out. This piece reminds me when I was starting out after graduating from college.

      This is Erin from Amazon Web Services. I took a look at the support case you provided, I see that one of our agents was able to assist and resolve the case.

      Please let us AWS Training USA there is anything else we can help with!

      Awesome! Thanks for putting this all in one place. Very useful!

      Kind Regards,

  2. Tks very much for your post.

    Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

    You also find all interview questions at link at the end of this post.

    Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

    Best rgs

  3. It's contains very useful data which i need and i want to see more quality posts in this blog so please update your blog. Thanks for sharing do my programming homework

  4. The fibonacci-calculator is a tool that traders use to help identify strategic places for transactions, stop losses or target prices to help them get in at a good price.

  5. Hi There,

    Great piece on My Book "Coding Interview: Questions, Analysis & Solutions", I’m a fan of the ‘flowery’ style Looking forward to more long form articles ??

    Totally new to Linux. I am running an older Acer Aspire one laptop with a 1.6 ghtz processor and plenty of ram. I downloaded Linux Mint (Cinnamon version) along with the proper unetbootin-windows-613 to my 8gb blank USB...well, I believe it is the proper version. I did get the 32 bit as that is what my system is.
    But nice Article Mate! Great Information! Keep up the good work!


  6. Hiya,

    Fully agree on My Book "Coding Interview: Questions, Analysis & Solutions" Was Published. We’re seeing a lot of projects tackle big complex problems but few seem to have taken into consideration and in particular reasons to adopt.

    I have a simple site that as an S3 static front end and a simple backend in lambda.The backend processes frontend forms. All it does is put the data in a database and sends an email to the administrator. AWS Tutorial

    Once again thanks for your tutorial.


  7. Hallo,

    Hot! That was HOT! Glued to the My Book "Coding Interview: Questions, Analysis & Solutions" Was Published your proficiency and style! AWS Training

    I'd like to work with AWS EC2, but when attempting to access the AWS console I get:
    Authentication failed because your account has been suspended. Please contact AWS customer support.

    Please keep providing such valuable information.