IT training c data structures deshpande kakde 2004 01 15

695 242 0
IT training c  data structures deshpande  kakde 2004 01 15

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html C & Data Structures P S Deshpande O G Kakde CHARLES RIVER MEDIA, INC Hingham, Massachusetts Copyright © 2003 Dreamtech Press Reprint Copyright © 2004 by CHARLES RIVER MEDIA, INC All rights reserved No part of this publication may be reproduced in any way, stored in a retrieval system of any type, or transmitted by any means or media, electronic or mechanical, including, but not limited to, photocopy, recording, or scanning, without prior permission in writing from the publisher Acquisitions Editor: James Walsh Production: Dreamtech Press Cover Design: Sherry Stinson CHARLES RIVER MEDIA, INC 10 Downer Avenue Hingham, Massachusetts 02043 781-740-0400 781-740-8816 (FAX) info@charlesriver.com http://www.charlesriver.com Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html P.S Deshpande and O.G Kakde C & Data Structures 1-58450-338-6 All brand names and product names mentioned in this book are trademarks or service marks of their respective companies Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products Library of Congress Cataloging-in-Publication Data Deshpande, P S C & data structures / P.S Deshpande, O.G Kakde p cm ISBN 1-58450-338-6 (Paperback with CD-ROM : alk paper) C (Computer program language) Data structures (Computer science) I Kakde, O G II Title QA76.73.C15D48 2003 005.7'3—dc22 2003021572 04 First Edition CHARLES RIVER MEDIA titles are available for site license or bulk purchase by institutions, user groups, corporations, etc For additional information, please contact the Special Sales Department at 781-740-0400 Requests for replacement of a defective CD-ROM must be accompanied by the original disc, your mailing address, telephone number, date of purchase and purchase price Please state the nature of the problem, and send the information to CHARLES RIVER MEDIA, INC., 10 Downer Avenue, Hingham, Massachusetts 02043 CRM's sole obligation to the purchaser is to replace the disc, based on defective materials or faulty workmanship, but not on the operation or functionality of the product Acknowledgments Writing any book is not an easy task We spent about one year designing the contents, implementing the programs and testing the programs Our 12 years of teaching experience has helped us to explain the issues in the language and complex problems in data structures We are thankful to our student Rupesh Nasre who, after receiving an M.Tech degree in computer science from IIT Mumbai, helped us in implementing advanced problems in data structures We are also thankful to our students Ms Usha Agrawal and Mr Ramchandra Vibhute for helping us in writing programs for II Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html C & Data Structures byP.S DeshpandeandO.G Kakde ISBN:1584503386 Charles River Media 2004 (700 pages) This thorough text provides a comprehensive guide to all the data types in C with internal implementation, while providing examples to demonstrate their behavior Table of Contents C & Data Structures Preface Part I - C Language Chapte - Introduction to the C Language r1 Chapte - Data Types r2 Chapte - C Operators r3 Chapte - Control Structures r4 Chapte - The printf Function r5 Chapte - Address and Pointers r6 Chapte - The scanf Function r7 Chapte - Preprocessing r8 Chapte - Arrays r9 Chapte - Function r 10 Chapte - Storage of Variables r 11 Chapte - Memory Allocation r 12 Chapte - Recursion r 13 Chapte - Strings r 14 Chapte - Structures r 15 Chapte - Union r 16 Chapte - Files r 17 Part II - Data Structures Chapte - Arrays, Searching, and Sorting Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html r 18 Chapte - Stacks and Queues r 19 Chapte - Linked Lists r 20 Chapte - Trees r 21 Chapte - Graphs r 22 Part III - Advanced Problems in Data Structures Chapte - Problems in Arrays, Searching, Sorting, Hashing r 23 Chapte - Problems in Stacks and Queues r 24 Chapte - Problems in Linked Lists r 25 Chapte - Problems in Strings r 26 Chapte - Problems in Trees r 27 Chapte - Problems in Graphs r 28 Chapte - Miscellaneous Problems r 29 Index List of Figures List of Tables Back Cover CD Content Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Preface The book is written for both undergraduate and graduate students of core computer science areas The book would be very useful for other students to learn programming for the purpose of making a career in computer science It covers all those topics that generally appear in aptitude tests and interviews It not only gives the language syntax but also discusses its behavior by showing the internal implementation We have covered almost the entire range of data structures and programming such as non-recursive implementation of tree traversals, A* algorithm in Artificial Intelligence, 8-queens problems, etc We also have supplied a CD-ROM which contains all the source material that appears in the book We welcome comments from our readers Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Part I: C Language Chapter 1: Introduction to the C Language Chapter 2: Data Types Chapter 3: C Operators Chapter 4: Control Structures Chapter 5: The printf Function Chapter 6: Address and Pointers Chapter 7: The scanf Function Chapter 8: Preprocessing Chapter 9: Arrays Chapter 10: Functions Chapter 11: Storage of Variables Chapter 12: Memory Allocation Chapter 13: Recursion Chapter 14: Strings Chapter 15: Structures Chapter 16: Union Chapter 17: Files Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Chapter 1: Introduction to the C Language THE FIRST PROGRAM IN C Introduction The C program is a set of functions The program execution begins by executing the function main () You can compile the program and execute using Turbo C compiler or using the following commands in Unix/Linux: $ cc -o a a.c where a.c is the file in which you have written the program This will create an executable file named a.exe $./a This will execute the program Program #include main() { printf("Hello \n"); /* prints Hello on standard output */ } Output : Hello Explanation The program execution begins with the function main() The executable statements are enclosed within a block that is marked by ‘{’ and ‘}’ The printf() function redirects the output to a standard output, which in most cases is the output on screen Each executable statement is terminated by ‘;’ The comments are enclosed in ‘/* */’ Variables Introduction When you want to process some information, you can save the values temporarily in variables In the following program you can define two variables, save the values, and put the addition in the third variable Program #include main() { int i,j,k; // Defining variables Statement A i = 6; // Statement B j = 8; k = i + j; Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html printf("sum of two numbers is %d \n",k); // Printing results } output : sum of two numbers is 14 Explanation Statement A defines variables of the type integer For each variable you have to attach some data type The data type defines the amount of storage allocated to variables, the values that they can accept, and the operations that can be performed on variables The ‘ // ’ is used as single line comment The ‘%d’ is used as format specifier for the integer Each data type has a format specifier that defines how the data of that data type will be printed The assignment operator is ‘=’ and the statement is in the format: Var = expression; Points to Remember The variables are defined at the begining of the block The data type is defined at the begining of declaration and followed by a list of variables It is the data type that assigns a property to a variable Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html INPUTTING THE DATA Introduction In C, the input from a standard input device, such as a keyboard, is taken by using the function scanf In scanf, you have to specify both the variables in which you can take input, and the format specifier, such as %d for the integer Program #include main() { int i,j,k; scanf("%d%d",&i,&j); // statement A k = i + j; printf("sum of two numbers is %d \n",k); } Input Output: sum of two numbers is Explanation Statement A indicates the scanf statement that is used for taking input In scanf you have to specify a list of addresses of variables (&i, &j) which can take input Before specifying the list of variables you have to include a list of format specifiers that indicate the format of the input For example, for the integer data type the format specifier is %d In scanf, you have to specify the address of the variable, such as &i The address is the memory location where a variable is stored The reason you must specify the address will be discussed later The number of format specifiers must be the same as the number of variables Point to Remember In scanf, you have to specify the address of a variable, such as &i, &j, and a list of format specifiers Page ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html THE CONTROL STATEMENT (if STATEMENT) Introduction You can conditionally execute statements using the if or the if else statement The control of the program is dependent on the outcome of the Boolean condition that is specified in the if statement Program #include main() { int i,j,big; //variable declaration scanf("%d%d",&i,&j); big = i; if(big < j) { // statement A // C big = j; } // Part Z, then part // D printf("biggest of two numbers is %d \n",big); if(i < j) // statement B { big = j; // Part X } else { big = i; // Part Y } printf("biggest of two numbers(using else) is %d \n",big); } Explanation 10 Statement A indicates the if statement The general form of the if statement is if(expr) { s1 ; s2 ; } expr is a Boolean expression that returns true (nonzero) or false (zero) In C, the value nonzero is true while zero is taken as false If you want to execute only one statement, opening and closing braces are not required, which is indicated by C and D in the current program 11 The else part is optional If the if condition is true then the part that is enclosed after the if is executed (Part X) If the if condition is false then the else part is executed (Part Y) 12 Without the else statement (in the first if statement), if the condition is true then Part Z is executed Points to Remember if and if else are used for conditional execution After the if statement the control is Page 10 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index O Octal numbers 21 One-dimensional array 167 Operator precedence 43 Overflow chaining 219 Page 681 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index P Parameter passing 106 Placeholders 58 Pointers 64 Postfix expression 240 Precision 60 Precision 58 Prefix expression 241 Preorder 355 Preprocessor 71 Prim's algorithm 414 printf function 57 Programming 141 Page 682 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index Q qsort 197 Queue 242 Quick sort 195 Page 683 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index R Random access 148 Random-access data structure 167 Recursion 127 Recursive function 128 Recursive programs 267 Register variables 118 Rehashing 219 Relational operator 34 Right shift operation 43 Row-major representation 168 Page 684 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index S Saddle point 189 of a matrix 439 scanf 67 scanf placeholder 68 Searching 192 Selection structure 45 Sequential file operations open 147 read 147 write 147 close 147 Sequential mapping 167 Sequential search 210 Sequential structure 45 Singly linked circular list 325 Sorted list merging 180 Sorting 192 Sparse matrices 308 Stack 103 Stack overheads 128 Stacks 227 applications 236 implementation using array 228 implementation using linked representation 231 push operation 228 pop operation 228 Static lifetime, of variables 115 Storage, of variables 115 String argument 67 String 133 Structure pointers 143 Structures 137 Swapping of left and right subtrees 367 switch Statement 50 Symbol table 217 Page 685 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index T Target key 370 Ternary operator 37 The all-cost shortest path 661 Three-dimensional array 95 Topological sort 632 Trees 347 Two-class classification 667 Two-dimensional array 168 Type casting 27 Type conversion 25 Type indicators 68 Type prefixes 59 Type identifiers 58 Page 686 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index U Unary operators 32 undef directive 72 Union 145 Page 687 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index V Value 63 Page 688 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Index W-Z while loop 51 Page 689 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html List of Figures Chapter 18: Arrays, Searching, and Sorting Figure 18.1: Representation of an array Figure 18.2: Row-major representation of a two-dimensional array Figure 18.3: Column major representation of a two-dimensional array Figure 18.4: Implementation of a static contiguous list Figure 18.5: A heap Figure 18.6: Hash table implementation using overflow chaining for collision handling Chapter 19: Stacks and Queues Figure 19.1: Stack operations Figure 19.2: Linked stack Figure 19.3: Operations on a queue Figure 19.4: Circular queue Figure 19.5: Linked queue Chapter 20: Linked Lists Figure 20.1: Sorting of a linked list Figure 20.2: A linked list showing the previous, current, and next nodes at some point during reversal process Figure 20.3: Sorting of a linked list Figure 20.4: Reversal of a list Figure 20.5: Before deletion Figure 20.6: After deletion Figure 20.7: Before insertion Figure 20.8: After insertion Figure 20.9: Insertion in a sorted list Figure 20.10: Polynomial representation Figure 20.11: A sparse matrix Figure 20.12: Linked list representation of sparse matrix of Figure 20.11 Figure 20.13: Result of application of the procedure sadd Figure 20.14: A circular list Page 690 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Figure 20.15: (A) A circular list with head node, (B) an empty circular list Figure 20.16: List containing 2n nodes Figure 20.17: Splitting of a circular list Figure 20.18: A doubly linked list maintained as chain Figure 20.19: A doubly linked list maintained as a circular list Figure 20.20: A doubly linked list maintained as a circular list with a header node Figure 20.21: Before termination of process p1 Figure 20.22: After termination of process p1 Chapter 21: Trees Figure 21.1: A tree structure Figure 21.2: A non-tree structure Figure 21.3: Binary tree structure Figure 21.4: Skewed trees Figure 21.5: A full binary tree Figure 21.6: A complete binary tree Figure 21.7: An array representation of a complete binary tree having nodes and depth Figure 21.8: An array representation of a complete binary tree with nodes and depth Figure 21.9: An array representation of a binary tree Figure 21.10: Linked representation of a binary tree Figure 21.11: A binary tree along with its inorder, preorder and postorder Figure 21.12: A binary tree of an expression along with its inorder and postorder Figure 21.13: Binary trees constructed using the given inorder Figure 21.14: A unique binary tree constructed using its inorder and postorder Figure 21.15: The binary search tree Figure 21.16: A unique binary tree constructed using the inorder and postorder Figure 21.17: A binary tree before deletion of a node pointed to by x Figure 21.18: A binary tree after deletion of a node pointed to by x Figure 21.19: A binary tree after deletion of a node pointed to by x Figure 21.20: A binary tree before deletion of a node pointed to by x Figure 21.21: A binary tree after deletion of a node pointed to by x Figure 21.22: A binary tree before deletion of a node pointed to by x Figure 21.23: A binary tree after deletion of a node pointed to by x Page 691 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Chapter 22: Graphs Figure 22.1: Graphs Figure 22.2: The subgraph of graph G2 Figure 22.3: Graph G Figure 22.4: Induced subgraph of Graph G of Figure 22.3 Figure 22.5: A connected graph Figure 22.6: A completely connected graph Figure 22.7: Adjacency matrices Figure 22.8: Adjacency list of G1 Figure 22.9: Graph G and its depth first traversals starting at vertex Figure 22.10: Breadth-first traversal of graph G starting at vertex v1 Figure 22.11: Connected component of G1 Figure 22.12: A diagraph Figure 22.13: Strongly connected components of the graph shown in Figure 22.12 Figure 22.14: Graph G Figure 22.15: Depth first spanning tree of the graph of Figure 22.14 Figure 22.16: Breadth-first spanning tree of the graph of Figure 22.14 Figure 22.17: A directed graph G Figure 22.18: Depth-first spanning forest for the graph G of Figure 22.17 Figure 22.19: A graph G Figure 22.20: Depth-first spanning tree of the graph G of Figure 22.19 Figure 22.21: A graph G Figure 22.22: The minimum-cost spanning tree of graph G of Figure 22.21 Figure 22.23: Directed acyclic graph Figure 22.24: DAG representation of expression (a+b)*c +((a+b) + e) Figure 22.25: A graph G Chapter 29: Miscellaneous Problems Figure 29.1: A knight can move to a maximum of eight positions Page 692 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html List of Tables Chapter 2: Data Types Table 2.1: Integer data type storage allocations Chapter 3: C Operators Table 3.1: Comparing the equality operator (= =) with the ‘=’ assignment operator Table 3.2: Results of AND, OR, and Negation Table 3.3: Operator precedence rules Chapter 17: Files Table 17.1: Random access Chapter 19: Stacks and Queues Table 19.1: Scanning the infex expression a*b+c/d from right to left Page 693 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html Back Cover Divided into three separate sections, C & Data Structures covers C programming, as well as the implementation of data structures and an analysis of advanced data structure problems Beginning with the basic concepts of the C language (including the operators, control structures, and functions), the book progresses to show these concepts through practical application with data structures such as linked lists and trees, and concludes with the integration of C programs and advanced data structure problem-solving The book covers a vast range of data structures and programming issues, such as syntactic and semantic aspects of C, all control statements in C, concepts of function, macro, files and pointers with examples, graphs, arrays, searching and sorting techniques, stacks and queues, files, and preprocessing C & Data Structures provides a comprehensive guide to all the data types in C with internal implementation, while providing examples to demonstrate their behavior KEY FEATURES  Explains all operators, expressions, control statements, and rules of C in detail  Demonstrates language syntax, as well as discussing its behavior by showing specific internal implementations  Covers data structures such as linked lists, trees, graphs, arrays, and commonly used algorithms, as well as advanced data structures such as B- trees and B+ trees About the Authors P.S Deshpande is a faculty member in the Department of Computer Science at Visvesvarya National Institute of Technology He has acted as a consultant to various government and private organizations in the field of database management, software engineering, data warehousing, WAP, and J2EE design patterns, and has published a number of papers on Oracle, data warehousing, and programming languages O.G Kakde is also a faculty member in the Department of Computer Science at Visvesvarya National Institute of Technology He has done consulting work for the government as well as private organizations in the fields of embedded systems, language translators, WAP, and several programming languages He is the author of Algorithms for Compiler Design Page 694 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html CD Content Following are select files from this book's Companion CD-ROM These files are for your personal use, are governed by the Books24x7 Membership Agreement, and are copyright protected by the publisher, author, and/or other third parties Unauthorized use, reproduction, or distribution is strictly prohibited Click on the link(s) below to download the files to your computer: File All CD Content Description Size 79,201 Page 695 ... C & data structures / P.S Deshpande, O.G Kakde p cm ISBN 1-58450-338-6 (Paperback with CD-ROM : alk paper) C (Computer program language) Data structures (Computer science) I Kakde, O G II Title... 14 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html checked after each iteration Page 15 ABC Amber CHM Converter Trial version, http://www.processtext.com/abcchm.html... characters are stored internally as integers Since each character can have bits, you can have 256 different character values (0–255) Each integer is associated with a character using a character

Ngày đăng: 05/11/2019, 15:54

Từ khóa liên quan

Mục lục

  • [Trial version] C & Data Structures

  • [Trial version] Table of Contents

  • [Trial version] Preface

  • [Trial version] Part I: C Language

    • [Trial version] Chapter 1: Introduction to the C Language

      • [Trial version] INPUTTING THE DATA

      • [Trial version] THE CONTROL STATEMENT (if STATEMENT)

      • [Trial version] THE ITERATION LOOP (for LOOP)

      • [Trial version] THE do...while LOOP

      • [Trial version] THE switch STATEMENT

    • [Trial version] Chapter 2: Data Types

      • [Trial version] VARIOUS DATA TYPES IN C

      • [Trial version] THE INTEGER DATA TYPE FAMILY

      • [Trial version] OVERFLOW IN char AND UNSIGNED char DATA TYPES

      • [Trial version] THE char TYPE

      • [Trial version] OCTAL NUMBERS

      • [Trial version] HEXADECIMAL NUMBERS

      • [Trial version] REPRESENTATION OF FLOATING-POINT NUMBERS

      • [Trial version] TYPE CONVERSION

      • [Trial version] FORCED CONVERSION

      • [Trial version] TYPE CASTING

    • [Trial version] Chapter 3: C Operators

      • [Trial version] ARITHMETIC OPERATOR

      • [Trial version] RELATIONAL OPERATOR

      • [Trial version] LOGICAL OPERATOR

      • [Trial version] TERNARY OPERATOR

      • [Trial version] INCREMENT OPERATOR

      • [Trial version] COMMA OPERATOR

      • [Trial version] BITWISE OPERATOR

      • [Trial version] OPERATOR PRECEDENCE

    • [Trial version] Chapter 4: Control Structures

      • [Trial version] THE if STATEMENT

      • [Trial version] SCOPE OF AN if CLAUSE

      • [Trial version] THE if-else STATEMENT

      • [Trial version] THE if-else if STATEMENT

      • [Trial version] THE switch STATEMENT

      • [Trial version] THE while LOOP

      • [Trial version] THE do-while LOOP

      • [Trial version] THE for LOOP

      • [Trial version] THE for LOOP WITH A COMMA OPERATOR

      • [Trial version] THE break STATEMENT

      • [Trial version] THE continue STATEMENT

    • [Trial version] Chapter 5: The printf Function

      • [Trial version] PLACEHOLDERS

    • [Trial version] Chapter 6: Address and Pointers

      • [Trial version] POINTERS

    • [Trial version] Chapter 7: The scanf Function

      • [Trial version] THE scanf PLACEHOLDERS

    • [Trial version] Chapter 8: Preprocessing

      • [Trial version] undef

      • [Trial version] ifdef

      • [Trial version] ifndef

      • [Trial version] #if

      • [Trial version] ifelse

      • [Trial version] ifelif

      • [Trial version] ERROR DIRECTIVE

      • [Trial version] #line

      • [Trial version] MACRO

      • [Trial version] MACRO AND FUNCTION

    • [Trial version] Chapter 9: Arrays

      • [Trial version] ADDRESS OF EACH ELEMENT IN AN ARRAY

      • [Trial version] ACCESSING AN ARRAY USING POINTERS

      • [Trial version] MANIPULATING ARRAYS USING POINTERS

      • [Trial version] ANOTHER CASE OF MANIPULATING AN ARRAY USING POINTERS

      • [Trial version] TWO-DIMENSIONAL ARRAY

      • [Trial version] THREE-DIMENSIONAL ARRAY

      • [Trial version] POINTER ARRAYS

    • [Trial version] Chapter 10: Function

      • [Trial version] THE CONCEPT OF STACK

      • [Trial version] THE SEQUENCE OF EXECUTION DURING A FUNCTION CALL

      • [Trial version] PARAMETER PASSING

      • [Trial version] CALL BY REFERENCE

      • [Trial version] THE CONCEPT OF GLOBAL VARIABLES

      • [Trial version] RESOLVING VARIABLE REFERENCES

      • [Trial version] SYNTAX OF FUNCTION DEFINITION

      • [Trial version] CALLING FUNCTION

    • [Trial version] Chapter 11: Storage of Variables

      • [Trial version] EXTERNAL REFERENCES

      • [Trial version] REGISTER VARIABLES

      • [Trial version] SCOPE OF VARIABLES

      • [Trial version] FURTHER SCOPE OF VARIABLES

    • [Trial version] Chapter 12: Memory Allocation

    • [Trial version] Chapter 13: Recursion

      • [Trial version] STACK OVERHEADS IN RECURSION

      • [Trial version] WRITING A RECURSIVE FUNCTION

    • [Trial version] Chapter 14: Strings

      • [Trial version] STRING DEFINITION

      • [Trial version] STRINGS AS PARAMETERS

    • [Trial version] Chapter 15: Structures

      • [Trial version] COMPLEX STRUCTURE DEFINITIONS

      • [Trial version] MEMORY ALLOCATION TO STRUCTURE

      • [Trial version] PROGRAMMING WITH STRUCTURES

      • [Trial version] STRUCTURE POINTERS

    • [Trial version] Chapter 16: Union

    • [Trial version] Chapter 17: Files

      • [Trial version] DIRECT ACCESS FILES

  • [Trial version] Part II: Data Structures

    • [Trial version] Chapter 18: Arrays, Searching, and Sorting

      • [Trial version] APPLICATION OF ARRAYS

      • [Trial version] MANIPULATIONS ON THE LIST IMPLEMENTED USING AN ARRAY

      • [Trial version] MERGING OF TWO SORTED LISTS

      • [Trial version] TRANSPOSE OF A MATRIX

      • [Trial version] FINDING THE SADDLE POINT OF A MATRIX

      • [Trial version] IMPLEMENTATION OF HEAPS

      • [Trial version] SORTING AND SEARCHING

      • [Trial version] BUBBLE SORT

      • [Trial version] QUICK SORT

      • [Trial version] MERGE SORT

      • [Trial version] HEAPSORT

      • [Trial version] SEARCHING TECHNIQUES: LINEAR OR SEQUENTIAL SEARCH

      • [Trial version] BINARY SEARCH

      • [Trial version] HASHING

      • [Trial version] HASHING FUNCTIONS

    • [Trial version] Chapter 19: Stacks and Queues

      • [Trial version] STACKS

      • [Trial version] APPLICATIONS OF STACKS

      • [Trial version] QUEUES

      • [Trial version] IMPLEMENTATION OF QUEUES

      • [Trial version] CIRCULAR QUEUES

      • [Trial version] IMPLEMENTATION OF A QUEUE USING LINKED REPRESENTATION

      • [Trial version] APPLICATIONS OF QUEUES

    • [Trial version] Chapter 20: Linked Lists

      • [Trial version] INSERTING A NODE BY USING RECURSIVE PROGRAMS

      • [Trial version] SORTING AND REVERSING A LINKED LIST

      • [Trial version] DELETING THE SPECIFIED NODE IN A SINGLY LINKED LIST

      • [Trial version] INSERTING A NODE AFTER THE SPECIFIED NODE IN A SINGLY LINKED LIST

      • [Trial version] INSERTING A NEW NODE IN A SORTED LIST

      • [Trial version] COUNTING THE NUMBER OF NODES OF A LINKED LIST

      • [Trial version] MERGING OF TWO SORTED LISTS

      • [Trial version] ERASING A LINKED LIST

      • [Trial version] POLYNOMIAL REPRESENTATION

      • [Trial version] REPRESENTATION OF SPARSE MATRICES

      • [Trial version] CIRCULAR LINKED LISTS

      • [Trial version] SPLITTING A LIST WITH 2N NODES INTO TWO SEPARATE AND EQUAL LISTS

      • [Trial version] MERGING OF TWO CIRCULAR LISTS

      • [Trial version] REVERSING THE DIRECTION OF LINKS IN A SINGLY LINKED CIRCULAR LIST

      • [Trial version] DOUBLY LINKED LISTS

      • [Trial version] INSERTION OF A NODE IN A DOUBLY LINKED LIST

      • [Trial version] DELETING A NODE FROM A DOUBLY LINKED LIST

      • [Trial version] APPLICATION OF DOUBLY LINKED LISTS TO MEMORY MANAGEMENT

    • [Trial version] Chapter 21: Trees

      • [Trial version] BINARY TREE AND ITS REPRESENTATION

      • [Trial version] BINARY TREE TRAVERSAL

      • [Trial version] BINARY SEARCH TREE

      • [Trial version] COUNTING THE NUMBER OF NODES IN A BINARY SEARCH TREE

      • [Trial version] SWAPPING OF LEFT AND RIGHT SUBTREES OF A GIVEN BINARY TREE

      • [Trial version] SEARCHING FOR A TARGET KEY IN A BINARY SEARCH TREE

      • [Trial version] DELETION OF A NODE FROM BINARY SEARCH TREE

    • [Trial version] Chapter 22: Graphs

      • [Trial version] REPRESENTATIONS OF A GRAPH

      • [Trial version] COMPUTING INDEGREE AND OUTDEGREE OF A NODE OF A GRAPH USING ADJACENCY MATRIX REPRESENTATION

      • [Trial version] DEPTH-FIRST TRAVERSAL

      • [Trial version] BREADTH-FIRST TRAVERSAL

      • [Trial version] CONNECTED COMPONENT OF A GRAPH

      • [Trial version] DEPTH-FIRST SPANNING TREE AND BREADTH-FIRST SPANNING TREE

      • [Trial version] MINIMUM-COST SPANNING TREE

      • [Trial version] DIRECTED ACYCLIC GRAPH (DAG)

  • [Trial version] Part III: Advanced Problems in Data Structures

    • [Trial version] Chapter 23: Problems in Arrays, Searching, Sorting, Hashing

      • [Trial version] PROBLEM:WRITE A PROGRAM TO FIND THE SADDLE POINT OF A MATRIX, IF IT EXISTS

      • [Trial version] PROBLEM: MULTIPLY TWO SPARSE MATRICES

      • [Trial version] PROBLEM: MULTIPLICATION OF TWO SPARSE MATRICES (DIFFERENT VERSIONS)

      • [Trial version] PROBLEM: IMPLEMENT K-WAY SORT-MERGE TO SORT A FILE CONTAINING RECORDS

      • [Trial version] PROBLEM: FIND A PLATEAU IN A MATRIX

      • [Trial version] PROBLEM: IMPLEMENTATION OF A HASH SEARCH

      • [Trial version] PROBLEM: IMPLEMENTATION OF REHASHING

    • [Trial version] Chapter 24: Problems in Stacks and Queues

      • [Trial version] PROBLEM: IMPLEMENTATION OF TWO STACKS USING AN ARRAY

    • [Trial version] Chapter 25: Problems in Linked Lists

      • [Trial version] PROBLEM: IMPLEMENTATION OF CIRCULAR LISTS BY USING ARRAYS

      • [Trial version] PROBLEM: REVERSING LINKS IN THE CASE OF CIRCULAR LIST

      • [Trial version] PROBLEM: MEMORY MANAGEMENT USING LISTS

      • [Trial version] PROBLEM: MEMORY MANAGEMENT USING VARIOUS SCHEMES

      • [Trial version] PROBLEM: GARBAGE COLLECTION—THE FIRST METHOD

      • [Trial version] PROBLEM: GARBAGE COLLECTION— THE SECOND METHOD

      • [Trial version] PROBLEM: COMPUTE N EQUIVALENCE CLASSES

    • [Trial version] Chapter 26: Problems in Strings

      • [Trial version] PROBLEM: MAXIMIZE A COMBINATION OF STRINGS—THE SECOND METHOD

      • [Trial version] PROBLEM: CLOSURE OF SETS

      • [Trial version] PROBLEM: DISTANCE BETWEEN TWO STRINGS

      • [Trial version] PROBLEM: FINDING THE MAXIMUM MATCHING PATTERN IN THE STRING

      • [Trial version] PROBLEM: IMPLEMENTATION OF THE SOUNDEX FUNCTION

    • [Trial version] Chapter 27: Problems in Trees

      • [Trial version] PROBLEM: WRITE A NON-RECURSIVE VERSION OF POSTORDER

      • [Trial version] PROBLEM: PREORDER TRAVERSAL OF A THREADED BINARY TREE

      • [Trial version] PROBLEM: IMPLEMENTATION OF A SET USING A BINARY TREE

      • [Trial version] PROBLEM: HUFFMAN CODING

      • [Trial version] PROBLEM: IMPLEMENTATION OF A B-TREE

      • [Trial version] PROBLEM: IMPLEMENTATION OF A B+ TREE

    • [Trial version] Chapter 28: Problems in Graphs

      • [Trial version] PROBLEM: CONNECTED COMPONENTS IN A GRAPH

      • [Trial version] PROBLEM: MINIMUM SPANNING TREE

      • [Trial version] PROBLEM: TOPOLOGICAL SORT

      • [Trial version] PROBLEM: FINDING THE SHORTEST PATH BY USING AN ADJACENCY MATRIX

      • [Trial version] PROBLEM: FINDING THE SHORTEST PATH BY USING AN ADJACENCY LIST

      • [Trial version] PROBLEM: THE M SHORTEST PATH

      • [Trial version] PROBLEM: THE ALL-COST SHORTEST PATH

    • [Trial version] Chapter 29: Miscellaneous Problems

      • [Trial version] PROBLEM: THE N-COINS PROBLEM

      • [Trial version] PROBLEM: ALL COMBINATIONS OF STRINGS

      • [Trial version] PROBLEM: THE 8-KNIGHTS PROBLEM

      • [Trial version] PROBLEM: N-QUEENS PROBLEM

      • [Trial version] PROBLEM: MAPPING OF N-QUEUES IN AN ARRAY

      • [Trial version] PROBLEM: IMPLEMENTATION OF A* ALGORITHM

  • [Trial version] Index

    • [Trial version] A

    • [Trial version] B

    • [Trial version] C

    • [Trial version] D

    • [Trial version] E

    • [Trial version] F

    • [Trial version] G

    • [Trial version] H

    • [Trial version] I-J

    • [Trial version] K

    • [Trial version] L

    • [Trial version] M

    • [Trial version] N

    • [Trial version] O

    • [Trial version] P

    • [Trial version] Q

    • [Trial version] R

    • [Trial version] S

    • [Trial version] T

    • [Trial version] U

    • [Trial version] V

    • [Trial version] W-Z

  • [Trial version] List of Figures

  • [Trial version] List of Tables

  • [Trial version] BACK COVER

  • [Trial version] CD Content

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan