The study of data structures and algorithms is critical to the development
Of the professional programmer. There are available, please books written on
Data structures and algorithms, but these books are usually written as college
Textbooks and are written using the programming ages typically taught
In college-Java or C ++. C # is becoming a very popular language and this
Book provides the C # programmer with the opportunity to study fundamental
Data structures and algorithms.
Learning data structures and algorithms is very important for professional programmers. Most books, including university textbooks, generally use C ++ or Java to describe data structures.
C # has also become popular. This opportunity is introduced. This book will study data structures and algorithms.
C # exists in a very rich development environment called the. NET Framework.
Encoded in the. NET Framework library is a set of data structure classes
(Also called collection classes), which range from the array, arraylist, and
Collection classes to the stack and queue classes and to the hashtable and
The sortedlist classes. The data structures and algorithms student can now see
How to use a data structure before learning how to implement it. previusly,
An attacker uctor had to discuss the concept of, say, a stack, role actly until
Complete data structure was constructed. Instructors can now show students
How to use a stack to perform some computation, such as number base conversions,
Demonstrating the utility of the data structure immediately.
C # run in.. NET Framework ,. net class library includes many data structure classes (also called collection classes), including arrays, generic arrays, collection classes, stacks, queues, hashtable and linked lists.
Learners of data structures and algorithms can use them without knowing how to implement them. Before that, the professor had to discuss the concept of stack, which was very abstract before the entire data structure was constructed.
Now, the professor can demonstrate to students how to use the stack to perform some operations, such as the number conversion, and immediately demonstrate the usefulness of the data structure.
Withthis background, the student can then go back and learn the fundamentals
The data structure (or algorithm) and even build their own implementation.
This book is written primarily as a practical overview of the data structures
And algorithms all serious computer programmers need to know and
Understand. Given this, there is no formal analysis of the data structures and
Algorithms covered in the book. Hence, there is not a single mathematical
Formula and not one mention of big Oh analysis (if you don't know what this
Means, look at any of the books mentioned in the bibliography). Instead,
Various data structures and algorithms are presented as problem-solving tools.
Simple timing tests are used to compare the performance of the Data Structures
And algorithms discussed in the book.
Based on this background, students can review and learn the nature of data structures or algorithms, and even implement them on their own. This book only gives an overview of the algorithms that senior programmers need to understand and master.
In view of this, there is no formal analysis of the data structure. Therefore, there is no mathematical formula or O analysis (I don't know what O is.To see other bibliography referenced in this book ).
Instead, we only use various data structures and algorithms as a tool to solve the problem.A simple timing test is used to compare the performance of various data structures and algorithms.
Prerequisites
The only prerequisite for this book is that the reader have some familiarity
With the C # language in general, and object-oriented programming in C # In
Particle.
Prerequisites: the only prerequisite is that you must be familiar with C # And be object-oriented.
Chapter-by-chapter Organization
Chapter 1 introduces the reader to the concept of the data structure as
Collection of data. The concepts of linear and nonlinear collections are introduced.
The Collection class is demonstrated. This chapter also introduces
Concept of generic programming, which allows the programmer to write one
Class, or one method, and have it work for a multitude of data types. Generic
Programming is an important new addition to C # (available in C #2.0 and
Beyond), so much so that there is a special library of generic data structures
Found in the system. Collections. Generic namespace. When a Data Structure
Has a generic implementation found in this library, its use is discussed.
Chapter ends with an introduction to methods of measuring the performance
Of the data structures and algorithms discussed in the book.
Chapter 1 introduces the concept of data structure as a data set, linear and nonlinear sets, collection classes, and generic programming (one class or method can support multiple data types ).
Generic is a new feature of C #2.0, so there is a new namespace named "system. Collections. Generic". At the end of this chapter, we will introduce the algorithm efficiency method.
Chapter 2 provides a review of how arrays are constructed, along
Demonstrating the features of the array class. The array class encapsulates
Association of the functions associated with arrays (ubound, lbound, and so on)
Into a single package. arraylists are special types of arrays that provide
Dynamic resizing capabilities.
Chapter 3 is an introduction to the basic sorting algorithms, such as
Bubble sort and the insertion sort, and Chapter 4 examines the most fundamental
Algorithms for searching memory, the sequential and binary searches.
Two classic data structures are examined in Chapter 5: the stack and
Queue. The emphasis in this chapter is on the practical use of these data
Structures in solving everyday problems in data processing. Chapter 6 covers
The bitarray class, which can be used to efficiently represent a large number
Of integer values, such as test scores.
Strings are not usually covered in a data structures book, but chapter 7
Covers strings, the string class, And the stringbuilder class. Because so much
Data processing in C # is already med on strings, the reader shocould be exposed
To the special techniques found in the two classes. Chapter 8 examines
Use of Regular Expressions for text processing and pattern matching. Regular
Expressions often provide more power and efficiency than can be had
More traditional string functions and methods.
Chapter 9 introduces the reader to the use of dictionaries as data structures.
Dictionaries, and the different data structures based on them, store data
Key/value pairs. This chapter shows the reader how to create his or her own
Classes based on the dictionarybase class, which is an abstract class. Chapter
10 covers hash tables and the hashtable class, which is a special type
Dictionary that uses a hashing algorithm for storing data internally.
Another classic data structure, the linked list, is covered in Chapter 11.
Linked lists are not as important a Data Structure in C # as they are in
Pointer-based language such as C ++, but they still have a role in C # programming.
Chapter 12 introduces the reader to yet another classic data structure-
The binary tree. A specialized type of Binary Tree, the binary search tree, is
The primary topic of the Chapter. Other types of Binary Trees are covered in
Chapter 15.
Chapter 13 shows the reader how to store data in sets, which can be useful in
Situations in which only unique data values can be stored in the data structure.
Chapter 14 covers more advanced sorting algorithms, including the Popular
And efficient quicksort, which is the basis for most of the sorting procedures
Implemented in the. NET Framework library. Chapter 15 looks at three data
Structures that prove useful for searching when a binary search tree is not
Called for: the AVL Tree, the red-black tree, And the Skip List.
Chapter 16 discusses graphs and graph algorithms. graphs are useful
Representing divide different types of data, especially networks. Finally, Chapter
17 introduces the reader to what algorithm design techniques really are:
Dynamic algorithms and greedy algorithms.
Acknowledgements
There are several different groups of people who must be thanked for helping
Me finish this book. First, thanks to a certain group of students who first
Sat through my lectures on developing data structures and algorithms. These
Students include (not in any particle order): Matt Hoffman, Ken Chen, Ken
Cates, Jeff Richmond, and Gordon Caffey. Also, one of my fellow Instructors
At Pulaski Technical College, Clayton Ruff, sat through tests of the lectures
And provided excellent comments and criticism. I also have to thank my
Department Dean, David durr, and my department chair, bernica Tackett,
Supporting my writing endeavors. I also need to thank my family for putting
Up with me while I was preoccupied with research and writing. Finally, then
Thanks to my editors at Cambridge, Lauren Cowles and Heather Bergman,
Putting up with my own questions, topic changes, and Habitual lateness.