tailieunhanh - Algorithms and Data Structures

In recent years the subject of computer programming has been recognized as a discipline whose mastery is fundamental and crucial to the success of many engineering projects and which is amenable to scientific treatement and presentation. It has advanced from a craft to an academic discipline. The initial outstanding contributions toward this development were made by . Dijkstra and . Hoare. Dijkstra's Notes on Structured Programming [1] opened a new view of programming as a scientific subject and intellectual challenge, and it coined the title for a "revolution" in programming. Hoare's Axiomatic Basis of Computer Programming [2] showed in a lucid manner that. | 5 Algorithms and Data Structures N. Wirth 1985 Oberon version August 2004 Contents Preface 1 Fundamental Data Structures Introduction The Concept of Data Type Primitive Data Types Standard Primitive Types Integer types The type REAL The type BOOLEAN The type CHAR The type SET The Array Structure The Record Structure Representation of Arrays Records and Sets Representation of Arrays Representation of Recors Representation of Sets The File Sequence Elementary File Operators Buffering Sequences Buffering between Concurrent Processes Textual Input and Output Searching Linear Search Binary Search Table Search Straight String Search The Knuth-Morris-Pratt String Search The Boyer-Moore String Search Exercises 2 Sorting Introduction Sorting Arrays Sorting by Straight Insertion Sorting by Straight Selection Sorting by Straight Exchange Advanced Sorting Methods Insertion Sort by Diminishing Increment Tree Sort Partition Sort Finding the Median A Comparison of Array Sorting Methods Sorting Sequences Straight Merging Natural Merging Balanced Multiway Merging Polyphase Sort Distribution of Initial Runs Exercises 6 3 Recursive Algorithms Introduction When Not to U se Recursion Two Examples of Recursive Programs Backtracking Algorithms The Eight Queens Problem The Stable Marriage Problem The Optimal Selection Problem Exercises 4 Dynamic Information Structures Recursive Data Types Pointers Linear Lists Basic Operations Ordered Lists and Reorganizing Lists An Application Topological Sorting Tree Structures Basic Concepts and Definitions Basic Operations on Binary Trees Tree Search and Insertion Tree Deletion Analysis of Tree Search and Insertion Balanced