O'Reilly logo

Coding Interviews: Questions, Analysis & Solutions by Harry He

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5

images

High-Quality Code

Interview candidates will want to write code of high quality during interviews, but many of them cannot meet their interviewers’ expectations. This chapter provides detailed instructions on how to write clean, complete, and robust code. While solving a set of sample coding interview problems, we will illustrate how functional, boundary, and negative test cases, as well as defensive programming, are used to produce complete and robust code.

Clearness

Interviewers make their hiring decisions based on candidates’ code. Code clearness has an important impact on the decision. As shown in Figure 5-1, handwriting, layout, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required