Book Image

The Complete Coding Interview Guide in Java

By : Anghel Leonard
Book Image

The Complete Coding Interview Guide in Java

By: Anghel Leonard

Overview of this book

Java is one of the most sought-after programming languages in the job market, but cracking the coding interview in this challenging economy might not be easy. This comprehensive guide will help you to tackle various challenges faced in a coding job interview and avoid common interview mistakes, and will ultimately guide you toward landing your job as a Java developer. This book contains two crucial elements of coding interviews - a brief section that will take you through non-technical interview questions, while the more comprehensive part covers over 200 coding interview problems along with their hands-on solutions. This book will help you to develop skills in data structures and algorithms, which technical interviewers look for in a candidate, by solving various problems based on these topics covering a wide range of concepts such as arrays, strings, maps, linked lists, sorting, and searching. You'll find out how to approach a coding interview problem in a structured way that produces faster results. Toward the final chapters, you'll learn to solve tricky questions about concurrency, functional programming, and system scalability. By the end of this book, you'll have learned how to solve Java coding problems commonly used in interviews, and will have developed the confidence to secure your Java-centric dream job.
Table of Contents (25 chapters)
1
Section 1: The Non-Technical Part of an Interview
7
Section 2: Concepts
12
Section 3: Algorithms and Data Structures
19
Section 4: Bonus – Concurrency and Functional Programming

What this book covers

Chapter 1, Where to Start and How to Prepare for the Interview, is a comprehensive guide that tackles the preparation process for a Java interview from zero to hire. More precisely, we want to highlight the main checkpoints that can ensure a smooth and successful career path ahead.

Chapter 2, What Interviews at Big Companies Look Like, talks about how interviews are conducted in the main Big Tech firms of Google, Amazon, Microsoft, Facebook, and Crossover.

Chapter 3, Common Non-Technical Questions and How To Answer Them, tackles the main aspects of the non-technical questions. This part of the interview is commonly carried out by a hiring manager or even an HR person.

Chapter 4, How to Handle Failures, discusses a delicate aspect of the interview – handling failures. The main purpose of this chapter is to show you how to identify the causes of failure and how to mitigate them in the future.

Chapter 5, How to Approach a Coding Challenge, covers the technical quizzes and coding challenge topics that are commonly referred to as the technical interview.

Chapter 6, Object-Oriented Programming, explains the most popular questions and problems concerning object-oriented programming encountered at Java interviews, including the SOLID principles and coding challenges such as Jukebox, Parking Lot, and Hash Table.

Chapter 7, Big O Analysis of Algorithms, provides the most popular metric for analyzing the efficiency and scalability of algorithms, the Big O notation, in the context of a technical interview.

Chapter 8, Recursion and Dynamic Programming, covers one of the favorite topics of interviewers – recursion and Dynamic Programming. Both of these topics work hand in hand with each other, so you have to be able to cover both.

Chapter 9, Bit Manipulation, explains the most important aspects of bit manipulation that you should know in a technical interview. Such problems are often encountered in interviews and they are not easy. In this chapter, you have 25 such coding challenges.

Chapter 10, Arrays and Strings, covers 29 popular problems involving strings and arrays.

Chapter 11, Linked Lists and Maps, teaches you the 17 most famous coding challenges that involve maps and linked lists encountered in interviews.

Chapter 12, Stacks and Queues, explains the 11 most popular interview coding challenges involving stacks and queues. Mainly, you have to learn how to provide a stack/queue implementation from scratch and how to tackle coding challenges via the Java built-in implementations.

Chapter 13, Trees and Graphs, covers one of the most tricky topics in interviews – trees and graphs. While there are tons of problems related to these two topics, only a handful of them are actually encountered in interviews. It is therefore very important to give a high priority to the most popular problems concerning trees and graphs.

Chapter 14, Sorting and Searching, covers the most popular sorting and searching algorithms encountered in technical interviews. We will cover sorting algorithms such as Merge Sort, Quick Sort, Radix Sort, Heap Sort, and Bucket Sort, and searching algorithms such as Binary Search. By the end of this chapter, you should be able to tackle a wide range of problems that involve sorting and searching algorithms.

Chapter 15, Mathematics and Puzzles, talks about a controversial topic in interviews: mathematics and puzzle problems. A significant number of companies consider that these kinds of problems should not be part of a technical interview, while other companies still regard this topic as relevant for interviews.

Chapter 16, Concurrency, covers the most popular questions about Java concurrency (multithreading) that occur in general interviews involving the Java language.

Chapter 17, Functional-Style Programming, examines the most popular questions about Java functional-style programming. We cover key concepts, lambdas, and streams.

Chapter 18, Unit Testing, talks about unit-testing interview problems that you may encounter if you apply for a position such as a developer or software engineer. Of course, if you are looking for a tester (manual/automation) position, then this chapter may represent just another perspective on testing. Therefore, do not expect to see questions here specific to manual/automation tester positions.

Chapter 19, System Scalability, provides the widest range of scalability interview questions you may be asked during a junior/middle-level interview for a position such as a web application software architect, Java architect, or software engineer.