1. Trang chủ
  2. » Công Nghệ Thông Tin

C and data structures p s deshpande

930 108 0

Đ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

Cấu trúc

  • Table of Contents

  • BackCover

  • C & Data Structures

  • Preface

  • Part I: C Language

    • Chapter 1: Introduction to the C Language

      • INPUTTING THE DATA

      • THE CONTROL STATEMENT (if STATEMENT)

      • THE ITERATION LOOP (for LOOP)

      • THE do...while LOOP

      • THE switch STATEMENT

    • Chapter 2: Data Types

      • VARIOUS DATA TYPES IN C

      • THE INTEGER DATA TYPE FAMILY

      • OVERFLOW IN char AND UNSIGNED char DATA TYPES

      • THE char TYPE

      • OCTAL NUMBERS

      • HEXADECIMAL NUMBERS

      • REPRESENTATION OF FLOATING-POINT NUMBERS

      • TYPE CONVERSION

      • FORCED CONVERSION

      • TYPE CASTING

    • Chapter 3: C Operators

      • ARITHMETIC OPERATOR

      • RELATIONAL OPERATOR

      • LOGICAL OPERATOR

      • TERNARY OPERATOR

      • INCREMENT OPERATOR

      • COMMA OPERATOR

      • BITWISE OPERATOR

      • OPERATOR PRECEDENCE

    • Chapter 4: Control Structures

      • THE if STATEMENT

      • SCOPE OF AN if CLAUSE

      • THE if-else STATEMENT

      • THE if-else if STATEMENT

      • THE switch STATEMENT

      • THE while LOOP

      • THE do-while LOOP

      • THE for LOOP

      • THE for LOOP WITH A COMMA OPERATOR

      • THE break STATEMENT

      • THE continue STATEMENT

    • Chapter 5: The printf Function

      • PLACEHOLDERS

    • Chapter 6: Address and Pointers

      • POINTERS

    • Chapter 7: The scanf Function

      • THE scanf PLACEHOLDERS

    • Chapter 8: Preprocessing

      • undef

      • ifdef

      • ifndef

      • #if

      • ifelse

      • ifelif

      • ERROR DIRECTIVE

      • #line

      • MACRO

      • MACRO AND FUNCTION

    • Chapter 9: Arrays

      • ADDRESS OF EACH ELEMENT IN AN ARRAY

      • ACCESSING AN ARRAY USING POINTERS

      • MANIPULATING ARRAYS USING POINTERS

      • ANOTHER CASE OF MANIPULATING AN ARRAY USING POINTERS

      • TWO-DIMENSIONAL ARRAY

      • THREE-DIMENSIONAL ARRAY

      • POINTER ARRAYS

    • Chapter 10: Function

      • THE CONCEPT OF STACK

      • THE SEQUENCE OF EXECUTION DURING A FUNCTION CALL

      • PARAMETER PASSING

      • CALL BY REFERENCE

      • THE CONCEPT OF GLOBAL VARIABLES

      • RESOLVING VARIABLE REFERENCES

      • SYNTAX OF FUNCTION DEFINITION

      • CALLING FUNCTION

    • Chapter 11: Storage of Variables

      • EXTERNAL REFERENCES

      • REGISTER VARIABLES

      • SCOPE OF VARIABLES

      • FURTHER SCOPE OF VARIABLES

    • Chapter 12: Memory Allocation

    • Chapter 13: Recursion

      • STACK OVERHEADS IN RECURSION

      • WRITING A RECURSIVE FUNCTION

    • Chapter 14: Strings

      • STRING DEFINITION

      • STRINGS AS PARAMETERS

    • Chapter 15: Structures

      • COMPLEX STRUCTURE DEFINITIONS

      • MEMORY ALLOCATION TO STRUCTURE

      • PROGRAMMING WITH STRUCTURES

      • STRUCTURE POINTERS

    • Chapter 16: Union

    • Chapter 17: Files

      • DIRECT ACCESS FILES

  • Part II: Data Structures

    • Chapter 18: Arrays, Searching, and Sorting

      • APPLICATION OF ARRAYS

      • MANIPULATIONS ON THE LIST IMPLEMENTED USING AN ARRAY

      • MERGING OF TWO SORTED LISTS

      • TRANSPOSE OF A MATRIX

      • FINDING THE SADDLE POINT OF A MATRIX

      • IMPLEMENTATION OF HEAPS

      • SORTING AND SEARCHING

      • BUBBLE SORT

      • QUICK SORT

      • MERGE SORT

      • HEAPSORT

      • SEARCHING TECHNIQUES: LINEAR OR SEQUENTIAL SEARCH

      • BINARY SEARCH

      • HASHING

      • HASHING FUNCTIONS

    • Chapter 19: Stacks and Queues

      • STACKS

      • APPLICATIONS OF STACKS

      • QUEUES

      • IMPLEMENTATION OF QUEUES

      • CIRCULAR QUEUES

      • IMPLEMENTATION OF A QUEUE USING LINKED REPRESENTATION

      • APPLICATIONS OF QUEUES

    • Chapter 20: Linked Lists

      • INSERTING A NODE BY USING RECURSIVE PROGRAMS

      • SORTING AND REVERSING A LINKED LIST

      • DELETING THE SPECIFIED NODE IN A SINGLY LINKED LIST

      • INSERTING A NODE AFTER THE SPECIFIED NODE IN A SINGLY LINKED LIST

      • INSERTING A NEW NODE IN A SORTED LIST

      • COUNTING THE NUMBER OF NODES OF A LINKED LIST

      • MERGING OF TWO SORTED LISTS

      • ERASING A LINKED LIST

      • POLYNOMIAL REPRESENTATION

      • REPRESENTATION OF SPARSE MATRICES

      • CIRCULAR LINKED LISTS

      • SPLITTING A LIST WITH 2N NODES INTO TWO SEPARATE AND EQUAL LISTS

      • MERGING OF TWO CIRCULAR LISTS

      • REVERSING THE DIRECTION OF LINKS IN A SINGLY LINKED CIRCULAR LIST

      • DOUBLY LINKED LISTS

      • INSERTION OF A NODE IN A DOUBLY LINKED LIST

      • DELETING A NODE FROM A DOUBLY LINKED LIST

      • APPLICATION OF DOUBLY LINKED LISTS TO MEMORY MANAGEMENT

    • Chapter 21: Trees

      • BINARY TREE AND ITS REPRESENTATION

      • BINARY TREE TRAVERSAL

      • BINARY SEARCH TREE

      • COUNTING THE NUMBER OF NODES IN A BINARY SEARCH TREE

      • SWAPPING OF LEFT AND RIGHT SUBTREES OF A GIVEN BINARY TREE

      • SEARCHING FOR A TARGET KEY IN A BINARY SEARCH TREE

      • DELETION OF A NODE FROM BINARY SEARCH TREE

    • Chapter 22: Graphs

      • REPRESENTATIONS OF A GRAPH

      • COMPUTING INDEGREE AND OUTDEGREE OF A NODE OF A GRAPH USING ADJACENCY MATRIX REPRESENTATION

      • DEPTH-FIRST TRAVERSAL

      • BREADTH-FIRST TRAVERSAL

      • CONNECTED COMPONENT OF A GRAPH

      • DEPTH-FIRST SPANNING TREE AND BREADTH-FIRST SPANNING TREE

      • MINIMUM-COST SPANNING TREE

      • DIRECTED ACYCLIC GRAPH (DAG)

  • Part III: Advanced Problems in Data Structures

    • Chapter 23: Problems in Arrays, Searching, Sorting, Hashing

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

      • PROBLEM: MULTIPLY TWO SPARSE MATRICES

      • PROBLEM: MULTIPLICATION OF TWO SPARSE MATRICES (DIFFERENT VERSIONS)

      • PROBLEM: IMPLEMENT K-WAY SORT-MERGE TO SORT A FILE CONTAINING RECORDS

      • PROBLEM: FIND A PLATEAU IN A MATRIX

      • PROBLEM: IMPLEMENTATION OF A HASH SEARCH

      • PROBLEM: IMPLEMENTATION OF REHASHING

    • Chapter 24: Problems in Stacks and Queues

      • PROBLEM: IMPLEMENTATION OF TWO STACKS USING AN ARRAY

    • Chapter 25: Problems in Linked Lists

      • PROBLEM: IMPLEMENTATION OF CIRCULAR LISTS BY USING ARRAYS

      • PROBLEM: REVERSING LINKS IN THE CASE OF CIRCULAR LIST

      • PROBLEM: MEMORY MANAGEMENT USING LISTS

      • PROBLEM: MEMORY MANAGEMENT USING VARIOUS SCHEMES

      • PROBLEM: GARBAGE COLLECTION-THE FIRST METHOD

      • PROBLEM: GARBAGE COLLECTION- THE SECOND METHOD

      • PROBLEM: COMPUTE N EQUIVALENCE CLASSES

    • Chapter 26: Problems in Strings

      • PROBLEM: MAXIMIZE A COMBINATION OF STRINGS-THE SECOND METHOD

      • PROBLEM: CLOSURE OF SETS

      • PROBLEM: DISTANCE BETWEEN TWO STRINGS

      • PROBLEM: FINDING THE MAXIMUM MATCHING PATTERN IN THE STRING

      • PROBLEM: IMPLEMENTATION OF THE SOUNDEX FUNCTION

    • Chapter 27: Problems in Trees

      • PROBLEM: WRITE A NON-RECURSIVE VERSION OF POSTORDER

      • PROBLEM: PREORDER TRAVERSAL OF A THREADED BINARY TREE

      • PROBLEM: IMPLEMENTATION OF A SET USING A BINARY TREE

      • PROBLEM: HUFFMAN CODING

      • PROBLEM: IMPLEMENTATION OF A B-TREE

      • PROBLEM: IMPLEMENTATION OF A B+ TREE

    • Chapter 28: Problems in Graphs

      • PROBLEM: CONNECTED COMPONENTS IN A GRAPH

      • PROBLEM: MINIMUM SPANNING TREE

      • PROBLEM: TOPOLOGICAL SORT

      • PROBLEM: FINDING THE SHORTEST PATH BY USING AN ADJACENCY MATRIX

      • PROBLEM: FINDING THE SHORTEST PATH BY USING AN ADJACENCY LIST

      • PROBLEM: THE M SHORTEST PATH

      • PROBLEM: THE ALL-COST SHORTEST PATH

    • Chapter 29: Miscellaneous Problems

      • PROBLEM: THE N-COINS PROBLEM

      • PROBLEM: ALL COMBINATIONS OF STRINGS

      • PROBLEM: THE 8-KNIGHTS PROBLEM

      • PROBLEM: N-QUEENS PROBLEM

      • PROBLEM: MAPPING OF N-QUEUES IN AN ARRAY

      • PROBLEM: IMPLEMENTATION OF A* ALGORITHM

  • Index

    • Index_A

    • Index_B

    • Index_C

    • Index_D

    • Index_E

    • Index_F

    • Index_G

    • Index_H

    • Index_I-J

    • Index_K

    • Index_L

    • Index_M

    • Index_N

    • Index_O

    • Index_P

    • Index_Q

    • Index_R

    • Index_S

    • Index_T

    • Index_U

    • Index_V

    • Index_W-Z

  • List of Figures

  • List of Tables

  • CD Content

Nội dung

C & Data Structures ISBN:1584503386 by P.S Deshpande and O.G Kakde 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 CD Content Table of Contents C & Data Structures Preface Part I - C Language Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 - Introduction to the C Language - Data Types - C Operators - Control Structures - The printf Function - Address and Pointers - The scanf Function - Preprocessing - Arrays Chapter 10 - Function Chapter 11 - Storage of Variables Chapter 12 - Memory Allocation Chapter 13 - Recursion Chapter 14 - Strings Chapter 15 - Structures Chapter 16 - Union Chapter 17 - Files Part II - Data Structures Chapter 18 - Arrays, Searching, and Sorting Chapter 19 - Stacks and Queues Chapter 20 - Linked Lists Chapter 21 - Trees Chapter 22 - Graphs Part III - Advanced Problems in Data Structures Problems in Arrays, Searching, Sorting, Hashing Chapter 24 - Problems in Stacks and Queues Chapter 25 - Problems in Linked Lists Chapter 26 - Problems in Strings Chapter 27 - Problems in Trees Chapter 28 - Problems in Graphs Chapter 29 - Miscellaneous Problems Index List of Figures List of Tables CD Content Chapter 23 - 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 problemsolving 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 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 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) 2 Data structures (Computer science) I Kakde, O G II Title QA76.73.C15D48 2003 005.7'3—dc22 2003021572 04 7 6 5 4 3 2 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-7400400 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 Parts I and II 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 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 Chapter 1: Introduction to the C Language ... 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. .. 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. .. 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

Ngày đăng: 19/04/2019, 11:11

TỪ KHÓA LIÊN QUAN