This book introduces you to the world of data structures and algorithms. Datastructure defines the way data is arranged in computer memory for fast andefficient access while algorithm is a set of instruction to solve problems bymanipulating these data structures.
Data Structures algorithms In GoHemant jainCopyright o Hemant Jain 2017. All Right ReservedHemant Jain asserts the moral right to be identified ashe author of this workAll rights reserved. No part of this publication may bereproduced, stored in or introduced into a retrievalsystem, or transmitted, in any form, or by any means(electrical, mechanical, photocopying, recording orotherwise) without the prior written permission of theauthor, except in the case of very brief quotationsembodied in critical reviews and certain other noncommercial uses permitted by copyright law. Anyperson who does any unauthorized act in relation to thispublication may be liable to criminal prosecution andcivil claims for damagesACKNOWLEDGEMENTThe author is very grateful to God ALMIGhTY for his grace andblessingDeepest gratitude for the help and support of my brother DrSumant Jain. This book would not have been possible without thesupport and encouragement he providedI would like to express profound gratitude to my guide/ my friendNaveen Kaushik for his invaluable encouragement, supervisionand useful suggestion throughout this book writing work. hissupport and continuous guidance enable me to complete my worksuccessfuFinally yet importantly, I am thankful to Love Singhal, Anil berryand others who helped me directly or indirectly in completing thisbookHemant JainTABLE OF CONTENTSACKNOWLEDGEMENTTABLE OF CONTENTSChAPTER O: HOW TO USE THIS BOOKWHAT THIS BOOK IS ABOUTPREPARATION PLANSSUMMARYChAPTER 1: NTRODUCTION- PROGRAMMIING OVERVIEWINTRODUCTIONFIRST GO PROGRAMvariables constantsBASIC DATA TYPESSTRINGCONDITIONS AND LOOPSFUNCTIONPARAMETER PASSING CALL BY VALUEPOINTERSPARAMETER PASSING. CALL BY POINTER/ REFERENCESTRUCTURESMETHODSINTERFACEARRaySLICEMAP/ DICTIONARYARRAY INTERVIEW QUESTIONSCONCEPT OF STACKSYSTEM STACK AND METHOD CALLSRECURSIVE FUNCTIONEXERCISESCHAPTER 2: ALGORITHMS ANALYSISINTRODUCTIONALGORITHMASYMPTOTIC ANALYSISBIG-O NOTATIONOMEGA-Q NOTATIONTHETA-⊙ NOTATIONCOMPLEXITY ANALYSIS OF ALGORITHMSTIME COMPLEXITY ORDERDERIVING THE RUNTIME FUNCTION OF AN ALGORITHMTIME COMPLEXITY EXAMPLESMASTER THEOREMMODIFIED MASTER THEOREMEXERCISECHAPTER 3: APPROACH TO SOLVE ALGORITHM DESIGNPROBLEMSINTRODUCTIONCONSTRAINTSIDEA GENERATIONCOMPLEXITIESCODINGTESTINGEⅹ AMPLESUMMARYChaPTER 4: ABSTRACT DATA TYPE GO CollECtIonsABSTRACT DATA TYPE (ADTDATA-STRUCTUREGO COLLECTION FRAMEWORKACKQUEUETREEBINARY TREEBINARY SEARCH TREES (BSTPRIORITY QUEUE (HEAPHASH-TABLEDICTIONARY/ SYMBOL TABLEGRAPHSGRAPH ALGORITHMSSORTING ALGORITHMSCOUNTING SORTEND NOTEchaPTER 5: SEARCHINGINTRODUCTIONWHY SEARCHING?DIFFERENT SEARCHING ALGORITHMSLINEAR SEARCH- UNSORTED INPUTLINEAR SEARCH- SORTEDBINARY SEARCHSTRING SEARCHING ALGORITHMSHASHING AND SYMBOL TABLESHOW SORTING IS USEFUL IN SELECTION ALGORITHM?PROBLEMS IN SEARCHINGEXERCISECHAPTER 6: SORTINGINTRODUCTIONTYPE OF SORTINGBUBBLE-SORTMODIFIED (IMPROVED) BUBBLE-SORTINSERTION-SORTSELECTION-SORTMERGE-SORTQUICK-SORTQUICK SELECTBUCKET SORTGENERALIZED BUCKET SORTHEAP-SORTTREE SORTINGEXTERNAL SORT (EXTERNAL MERGE-SORTICOMPARISONS OF THE VARIOUS SORTING ALGORITHMSSELECTION OF BEST SORTING ALGORITHMEXERCISEChAPTER 7: LINKED LISTINTRODUCTIONLINKED LISTTYPES OF LINKED LISTSINGLY LINKED LISTDOUBLY LINKED LISTCIRCULAR LINKED LISTDOUBLY CIRCULAR LISTEXERCISEchapter 8: STACKINTRODUCTIONTHE STACK ABSTRACT DATA TYPESTACK USING SLICESSTACK GENERIC IMPLEMENTATIONSTACK USING LINKED LISTPROBLEMS IN STACKUSES OF STACKEXERCISEchaPTER 9: QUEUEINTRODUCTIONTHE QUEUE ABSTRACT DATA TYPEQUEUE USING LISTQUEUE USING LINKED LISTPROBLEMS IN QUEUEEXERCISECHAPTER 10: TREEINTRODUCTIONTERMINOLOGY IN TREEBINARY TREETYPES OF BINARY TREESPROBLEMS IN BINARY TREEBINARY SEARCH TREE (BST)PROBLEMS IN BINARY SEARCH TREE(BSTISEGMENT TREEAVL TREESRED-BLACK TREESPLAY TREEB-TREEB+ TREEB* TREEEXERCISECHAPTER Il: PRIORITY QUEUEINTRODUCTIONTYPES OF HEAPHEAP ADT OPERATIONSOPERATION ON HEAPHEAP-SORTUSES OF HEAPPROBLEMS IN HEAPPRIORITY QUEUE GENERIC IMPLEMENTATION.PRIORITY QUEUE USING HEAP FROM CONTAINER.EXERCISECHAPTER 12: HASH-TABLEINTRODUCTIONHASH-TABLEHASHIING WITH OPEN ADDRESSINGHASHING WITH SEPARATE CHAININGPROBLEMS IN HASHINGEXERCISEChaPTER 13: GRAPHSINTRODUCTIONGRAPH REPRESENTATIONADJACENCY MATRIXADJACENCY LISTGRAPH TRAVERSALSDEPTH FIRST TRAVERSALBREADTH FIRST TRAVERSALPROBLEMS IN GRAPHDIRECTED ACYCLIC GRAPHTOPOLOGICAL SORTMINIMUM SPANNING TREES (MST)SHORTEST PATH ALGORITHMS IN GRAPHEXERCISEChAPTER 14: STRING ALGORITHMSTRODUCTIONSTRING MATCHINGDICTIONARY/ SYMBOL TABLEPROBLEMS IN STRINGEXERCISECHAPTER 15: ALGORITHM DESIGN TECHNIQUESNTRODUCTIONBRUTE FORCE ALGORITHMGREEDY ALGORITHMDIVIDE-AND-CONQUER, DECREASE-AND-CONQUERDYNAMIC PROGRAMMINGREDUCTION TRANSFORM-AND-CONQUERBACKTRACKINGBRANCH-AND-BOUNDA ALGORITHMCONCLUSIONCHAPTER 16: BRUTE FORCE ALGORITHMINTRODUCTIONPROBLEMS IN BRUTE FORCE ALGORITHMCONCLUSIONCHAPTER 17: GREEDY ALGORITHMINTRODUCTIONPROBLEMS ON GREEDY ALGORITHMCHAPTER 18: DIVIDE-AND-CONQUER, DECREASE-AND-CONQUER
1