Coding Interview Questions ToC
Coding Interview Questions ToC
Interview
Questions
By
Narasimha Karumanchi
Concepts
Problems
Interview Questions
Copyright 2017 by .
All rights reserved.
Designed by
Acknowledgements
and , it is impossible to thank you adequately for everything you have done, from loving me
unconditionally to raising me in a stable household, where your persistent efforts and traditional values taught your
children to celebrate and embrace life. I could not have asked for better parents or role-models. You showed me that
anything is possible with faith, hard work and determination.
This book would not have been possible without the help of many people. I would like to thank them for their efforts in
improving the end result. Before we do so, however, I should mention that I have done my best to correct the mistakes
that the reviewers have pointed out and to accurately describe the protocols and mechanisms. I alone am responsible
for any remaining errors.
First and foremost, I would like to express my gratitude to many people who saw me through this book, to all those
who provided support, talked things over, read, wrote, offered comments, allowed me to quote their remarks and
assisted in the editing, proofreading and design. In particular, I would like to thank the following individuals:
-
M-Tech,
Founder, .
Preface
Dear Reader,
Please Hold on! I know many people do not read the preface. But I would strongly recommend that you go through the
preface of this book at least. The reason for this is that this preface has to offer.
This book assumes you have some basic knowledge about computer science. The main objective of the book is not to
give you the theorems and proofs about and . I have followed a pattern of improving the
problem solutions with different complexities (for each problem, you will find multiple solutions with different, and
reduced complexities). Basically, its an enumeration of possible solutions. With this approach, even if you get a new
question it will show you a way to think about all possible solutions. This book is very useful for interview preparation,
competitive exams preparation, and campus interview preparations.
As a if you read the complete book with good understanding, I am sure you will challenge the interviewers
and that is the objective of this book.
This book is very useful for the of and during their academic preparations. In all
the chapters you will see that more importance has been given to problems and their analysis instead of theory. For
each chapter, first you will read about the basic required theory and this will be followed by a section on problem sets.
There are approximately 700 algorithmic problems and all of them are with solutions.
In most the chapters you will see more importance given to and analyzing them instead of concentrating more
on theory. For each chapter, first you will see the basic required theory and then followed by problems.
For many problems, solutions are provided with different levels of complexities. We start with the
solution and slowly move towards the possible for that problem. For each problem we will try to
understand how much time algorithm takes and how much memory the algorithm uses.
It is that the reader does at least one complete reading of this book to get full understanding of all the
topics that are covered. In subsequent readings you can skip directly to any chapter to refer to a specific topic. Even
though, enough readings have been done for the purpose of correcting errors, there could be some minor typos in the
book. If any such typos are found, they will be updated at . . . I request that you frequently monitor
this site for any corrections, new problems and solutions. Also, please provide your valuable suggestions at:
@..
Wish you all the best. I am sure that you will find this book useful.
-
M-Tech,
Founder, .
Table of Contents
1.
2.
3.
13
13
13
14
14
15
17
20
20
21
25
27
28
Interpreter versus Compiler --------------------------------------------------------------------------------------------What Are Scripting Languages? ---------------------------------------------------------------------------------------Shell Scripting -----------------------------------------------------------------------------------------------------------PERL [Practical Extraction and Report Language] -----------------------------------------------------------------Python ----------------------------------------------------------------------------------------------------------------------
71
72
72
78
95
4.
5.
6.
7.
8.
9.
18.3
18.4
18.5
18.6