Table Of ContentProblem Solving in
Data Structures &
Algorithms
Using C#
First Edition
By Hemant Jain
Book Title: Problems Solving in Data Structures & Algorithms Using C#
Book Author: Hemant Jain
Published by Hemant Jain
HIG 4, Samarth Tower, Sarvadharm, D Sector, Bhopal, India, Pin Code: 462042
Published in Bhopal, India
This edition published January 2017
Copyright © Hemant Jain 2017. All Right Reserved.
Hemant Jain asserts the moral right to be identified as the author of this work.
All rights reserved. No part of this publication may be reproduced, stored in or introduced into a retrieval
system, or transmitted, in any form, or by any means (electrical, mechanical, photocopying, recording or
otherwise) without the prior written permission of the author, except in the case of very brief quotations
embodied in critical reviews and certain other non-commercial uses permitted by copyright law. Any
person who does any unauthorized act in relation to this publication may be liable to criminal prosecution
and civil claims for damages.
ACKNOWLEDGEMENT
The author is very grateful to GOD ALMIGHTY for his grace and blessing.
Deepest gratitude for the help and support of my brother Dr. Sumant Jain. This book would not have been
possible without the support and encouragement he provided.
I would like to express profound gratitude to my guide/ my friend Naveen Kaushik for his invaluable
encouragement, supervision and useful suggestion throughout this book writing work. His support and
continuous guidance enable me to complete my work successfully.
Finally yet importantly, I am thankful to Love Singhal, Anil Berry and Others who helped me directly or
indirectly in completing this book.
Hemant Jain
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this book. You can
provide your valuable feedback at www.Amazon.com & www.Flipkart.com.
Error Reporting
Although the author had tried his best to ensure the accuracy of the content of this book, but mistake do
happens. If you find a mistake in this book - may be mistake in the text or the code. We would be grateful
if you report them to us. Your feedbacks will help us in improving the next version of this book. If you
find an error simply, send an email to us at feedback@techinterview.in. In the error reporting please,
mention the book title in the subject of your message.
To: feedback@techinterview.in
Subject: Error : <Book Title>
Message: <Description of the Error>
New Problems
If the reader thinks that, a new problem should be added to this book. Then please send that problem to us.
To: feedback@techinterview.in
Subject: Problem : <Book Title>
Message: <Description of the Problem>
New Requests
If the reader thinks that, a new topic or some more elaboration need to be added to an existing topic of
this book. Then please send that request to us.
To: feedback@techinterview.in
Subject: Request : <Book Title>
Message: <Description of the Request>
TABLE OF CONTENTS
TABLE OF CONTENTS
CHAPTER 0: HOW TO USE THIS BOOK
WHAT THIS BOOK IS ABOUT
PREPARATION PLANS
SUMMARY
CHAPTER 1: INTRODUCTION - PROGRAMMING OVERVIEW
INTRODUCTION
FIRST C# PROGRAM
OBJECT
VARIABLE
DATA TYPES
PRIMITIVE/ BASIC DATA TYPES
PARAMETER PASSING, CALL BY VALUE
REFERENCE DATA TYPES
PARAMETER PASSING, CALL BY REFERENCE
KINDS OF VARIABLES
METHODS
ACCESS MODIFIERS
INTERFACE
RELATIONSHIP
GENERAL PROTOTYPE OF A CLASS
ABSTRACT CLASS & METHODS
NESTED CLASS
ENUMS
CONSTANTS
CONDITIONS AND LOOPS
ARRAY
TWO DIMENSIONAL ARRAY
ARRAY INTERVIEW QUESTIONS
CONCEPT OF STACK
SYSTEM STACK AND METHOD CALLS
RECURSIVE FUNCTION
EXERCISES
CHAPTER 2: ALGORITHMS ANALYSIS
INTRODUCTION
ASYMPTOTIC ANALYSIS
BIG-O NOTATION
OMEGA-Ω NOTATION
THETA-Θ NOTATION
COMPLEXITY ANALYSIS OF ALGORITHMS
TIME COMPLEXITY ORDER
DERIVING THE RUNTIME FUNCTION OF AN ALGORITHM
TIME COMPLEXITY EXAMPLES
MASTER THEOREM
MODIFIED MASTER THEOREM
EXERCISE
CHAPTER 3: APPROACH TO SOLVE ALGORITHM DESIGN PROBLEMS
INTRODUCTION
CONSTRAINTS
IDEA GENERATION
COMPLEXITIES
CODING
TESTING
EXAMPLE
SUMMARY
CHAPTER 4: ABSTRACT DATA TYPE & C# COLLECTIONS
ABSTRACT DATA TYPE (ADT)
DATA-STRUCTURE
C# COLLECTION FRAMEWORK
ARRAY
LINKED LIST
STACK
QUEUE
TREES
BINARY TREE
BINARY SEARCH TREES (BST)
PRIORITY QUEUE (HEAP)
HASH-TABLE
CHOOSING THE RIGHT COLLECTION CLASS
DICTIONARY / SYMBOL TABLE
GRAPHS
GRAPH ALGORITHMS
SORTING ALGORITHMS
COUNTING SORT
END NOTE
CHAPTER 5: SEARCHING
INTRODUCTION
WHY SEARCHING?
DIFFERENT SEARCHING ALGORITHMS
LINEAR SEARCH – UNSORTED INPUT
LINEAR SEARCH – SORTED
BINARY SEARCH
STRING SEARCHING ALGORITHMS
HASHING AND SYMBOL TABLES
HOW SORTING IS USEFUL IN SELECTION ALGORITHM?
PROBLEMS IN SEARCHING
EXERCISE
CHAPTER 6: SORTING
INTRODUCTION
TYPE OF SORTING
BUBBLE-SORT
MODIFIED (IMPROVED) BUBBLE-SORT
INSERTION-SORT
SELECTION-SORT
MERGE-SORT
QUICK-SORT
QUICK SELECT
BUCKET SORT
GENERALIZED BUCKET SORT
HEAP-SORT
TREE SORTING
EXTERNAL SORT (EXTERNAL MERGE-SORT)
COMPARISONS OF THE VARIOUS SORTING ALGORITHMS.
SELECTION OF BEST SORTING ALGORITHM
EXERCISE
CHAPTER 7: LINKED LIST
INTRODUCTION
LINKED LIST
TYPES OF LINKED LIST
SINGLY LINKED LIST
DOUBLY LINKED LIST
CIRCULAR LINKED LIST
DOUBLY CIRCULAR LIST
EXERCISE
CHAPTER 8: STACK
INTRODUCTION
THE STACK ABSTRACT DATA TYPE
STACK USING ARRAY
STACK USING ARRAY (GROWING-REDUCING CAPACITY IMPLEMENTATION)
STACK USING LINKED LIST
PROBLEMS IN STACK
PROS AND CONS OF ARRAY AND LINKED LIST IMPLEMENTATION OF STACK.
USES OF STACK
EXERCISE
CHAPTER 9: QUEUE
INTRODUCTION
THE QUEUE ABSTRACT DATA TYPE
QUEUE USING ARRAY
QUEUE USING LINKED LIST
PROBLEMS IN QUEUE
EXERCISE
CHAPTER 10: TREE
INTRODUCTION
TERMINOLOGY IN TREE
BINARY TREE
TYPES OF BINARY TREES
PROBLEMS IN BINARY TREE
BINARY SEARCH TREE (BST)
PROBLEMS IN BINARY SEARCH TREE (BST)
SEGMENT TREE
AVL TREES
RED-BLACK TREE
SPLAY TREE
B-TREE
B+ TREE
B* TREE
EXERCISE
CHAPTER 11: PRIORITY QUEUE
INTRODUCTION
TYPES OF HEAP
HEAP ADT OPERATIONS
OPERATION ON HEAP
HEAP-SORT
PRIORITYQUEUE<> GENERIC HEAP IMPLEMENTATION
USES OF HEAP
PROBLEMS IN HEAP
EXERCISE
CHAPTER 12: HASH-TABLE
INTRODUCTION
HASH-TABLE
HASHING WITH OPEN ADDRESSING
HASHING WITH SEPARATE CHAINING
COUNT MAP
PROBLEMS IN HASHING
EXERCISE
CHAPTER 13: GRAPHS
INTRODUCTION
Description:Problem_Solving_in_Data_Structures___Algorithms_Using_C.pdf B0728LNH39 EBOK Unknown