CHAPTER 3

images

Data Structures

The primary purpose of most computer programs is to store, retrieve, and process information. Consequently, data structures and algorithms that manipulate information are at the heart of computer science. For this reason, many interviewers often focus a number of their questions on these aspects. This chapter will cover typical interview questions about the most common data structures, including arrays, strings, lists, trees, stacks, and queues.

Arrays

Arrays might be the most simple data structure. Elements are sequentially stored in continuous memory in arrays. When an array is created, its size should be specified. ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.