A friendly introduction to the most useful algorithms written in simple, intuitive English
The revised and updated second edition of Essential Algorithms, offers an accessible introduction to computer algorithms. The book contains a description of important classical algorithms and explains when each is appropriate. The author shows how to analyze algorithms in order to understand their behavior and teaches techniques that the can be used to create new algorithms to meet future needs. The text includes useful algorithms such as: methods for manipulating common data structures, advanced data structures, network algorithms, and numerical algorithms. It also offers a variety of general problem-solving techniques.
In addition to describing algorithms and approaches, the author offers details on how to analyze the performance of algorithms. The book is filled with exercises that can be used to explore ways to modify the algorithms in order to apply them to new situations. This updated edition of Essential Algorithms:
* Contains explanations of algorithms in simple terms, rather than complicated math
* Steps through powerful algorithms that can be used to solve difficult programming problems
* Helps prepare for programming job interviews that typically include algorithmic questions
* Offers methods can be applied to any programming language
* Includes exercises and solutions useful to both professionals and students
* Provides code examples updated and written in Python and C#
Essential Algorithms has been updated and revised and offers professionals and students a hands-on guide to analyzing algorithms as well as the techniques and applications. The book also includes a collection of questions that may appear in a job interview. The book's website will include reference implementations in Python and C# (which can be easily applied to Java and C++).
Autorentext
Rod Stephens began his career as a mathematician, but while at MIT he was lured into the intriguing world of algorithms and has been programming ever since. An award-winning instructor, he regularly addresses conferences and has written more than 30 books that have been translated into nearly a dozen languages.
Klappentext
Master the most useful algorithms and build your problem-solving skills
Algorithms are the recipes that make efficient programming possible. Studying them lets you build a useful toolkit of methods for solving specific problems. Using Python and C#, this book introduces you to many classic algorithms, shows you where they work, and explains how to analyze them to understand their behavior. The study of algorithms also teaches general problem-solving techniques that make you a better programmer. You might find that this book not only helps you on the job, it may help you get the job.
Learn useful algorithms including
- Numerical algorithms: randomization, factoring, prime numbers, and numeric integration
- Methods for manipulating common data structures: arrays, linked lists, and networks
- More advanced data structures: heaps, trees, balanced trees, and B-trees
Learn these and other problem-solving techniques:
- Brute force or exhaustive search
- Divide and conquer
- Greedy algorithms and hill climbing
- Least cost algorithms
- Heuristics
- Constricting bounds
Zusammenfassung
A friendly introduction to the most useful algorithms written in simple, intuitive English
The revised and updated second edition of Essential Algorithms, offers an accessible introduction to computer algorithms. The book contains a description of important classical algorithms and explains when each is appropriate. The author shows how to analyze algorithms in order to understand their behavior and teaches techniques that the can be used to create new algorithms to meet future needs. The text includes useful algorithms such as: methods for manipulating common data structures, advanced data structures, network algorithms, and numerical algorithms. It also offers a variety of general problem-solving techniques.
In addition to describing algorithms and approaches, the author offers details on how to analyze the performance of algorithms. The book is filled with exercises that can be used to explore ways to modify the algorithms in order to apply them to new situations. This updated edition of Essential Algorithms:
- Contains explanations of algorithms in simple terms, rather than complicated math
- Steps through powerful algorithms that can be used to solve difficult programming problems
- Helps prepare for programming job interviews that typically include algorithmic questions
- Offers methods can be applied to any programming language
- Includes exercises and solutions useful to both professionals and students
- Provides code examples updated and written in Python and C#
Essential Algorithms has been updated and revised and offers professionals and students a hands-on guide to analyzing algorithms as well as the techniques and applications. The book also includes a collection of questions that may appear in a job interview. The book's website will include reference implementations in Python and C# (which can be easily applied to Java and C++).
Inhalt
Introduction xxix
Chapter 1 Algorithm Basics 1
Approach 2
Algorithms and Data Structures 2
Pseudocode 3
Algorithm Features 6
Big O Notation 7
Rule 1 8
Rule 2 8
Rule 3 9
Rule 4 9
Rule 5 10
Common Run Time Functions 11
1 11
Log N 11
Sqrt N 14
N 14
N log N 15
N2 15
2N 15
N! 16
Visualizing Functions 16
Practical Considerations 18
Summary 19
Exercises 20
Chapter 2 Numerical Algorithms 23
Randomizing Data 23
Generating Random Values 23
Generating Values 24
Ensuring Fairness 26
Getting Fairness from Biased Sources 28
Randomizing Arrays 29
Generating Nonuniform Distributions 30
Making Random Walks 31
Making Self-Avoiding Walks 33
Making Complete Self-Avoiding Walks 34
Finding Greatest Common Divisors 36
Calculating Greatest Common Divisors 36
Extending Greatest Common Divisors 38
Performing Exponentiation 40
Working with Prime Numbers 42
Finding Prime Factors 42
Finding Primes 44
Testing for Primality 45
Performing Numerical Integration 47
The Rectangle Rule 48
The Trapezoid Rule 49
Adaptive Quadrature 50
Monte Carlo Integration 54
Finding Zeros 55
Gaussian Elimination 57
Forward Elimination 58
Back Substitution 60
The Algorithm 61
Least Squares Fits 62
Linear Least Squares 62
Polynomial Least Squares 64
Summary 67
Exercises 68
Chapter 3 Linked Lists 71
Basic Concepts 71
Singly Linked Lists 72
Iterating Over the List 73
Finding Cells 73
Using Sentinels 74
Adding Cells at the Beginning 75
Adding Cells at the End 76
Inserting Cells After Other Cells 77
Deleting Cells 78
Doubly Linked Lists 79
Sorted Linked Lists 81
Self-Organizing Linked Lists 82
Move to Front (MTF) 83
Swap 83
Count 84
Hybrid Methods 84
Pseudocode 85
Linked-List Algorithms 86
Copying Lists 86
Sorting with Insertionsort 87
Sorting with Selectionsort 88
Multithreaded Linked Lists 90
Linked Lists with Loops 91…