CHAPTER 4

images

Algorithms

In addition to data structures, algorithms are also quite common topics in interviews. There are many interview questions about search and sort algorithms. Backtracking, dynamic programming, and greedy algorithms are useful tools to solve many problems posed in coding interviews. Additionally, bit operations can be viewed as special algorithms to manipulate binary integers. All of these algorithms will be discussed in this chapter.

Recursion and Iteration

Repeated operations are handled either by recursion or iteration with loops. Recursion is a function (method) that invokes itself, directly or indirectly. One of the fundamental ...

Get Coding Interviews: Questions, Analysis & Solutions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.