Beginning Java Data Structures and Algorithms Sharpen Your Problem Solving Skills by Learning Core Computer Science Concepts in a Pain-Free Manner
Learning about data structures and algorithms gives you a better insight on how to solve common programming problems. Most of the problems faced everyday by programmers have been solved, tried, and tested. By knowing how these solutions work, you can ensure that you choose the right tool when you fa...
Uloženo v:
| Hlavní autor: | |
|---|---|
| Médium: | E-kniha |
| Jazyk: | angličtina |
| Vydáno: |
Birmingham
Packt Publishing, Limited
2018
|
| Vydání: | 1 |
| ISBN: | 9781789537178, 1789537177 |
| On-line přístup: | Získat plný text |
| Tagy: |
Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
Obsah:
- Implementing Naive Search -- Developing the String Matching Algorithm in Java -- Rationalization of the Naive Search Algorithm -- Getting Started with the Boyer-Moore String Searching Algorithm -- The Bad Character Rule -- Activity: Implementing the Bad Character Rule -- The Good Suffix Rule -- Application of the Boyer-Moore Algorithm -- Implementing the Boyer-Moore Algorithm -- Introducing Other String Matching Algorithms -- Rabin-Karp -- Applying the Rabin-Karp Algorithm -- Knuth-Morris-Pratt -- Aho-Corasick -- Summary -- Graphs, Prime Numbers, and Complexity Classes -- Representing Graphs -- Adjacency List Representation -- Writing a Java Code to Add Weights to the Directed Graph -- Adjacency Matrix Representation -- Activity: Building the Adjacency Matrix Representation of a Weighted Undirected Graph -- Traversing a Graph -- Breadth-First Search -- Depth-First Search -- Cycle Detection -- Activity: Using BFS to Find the Shortest Path Out of a Maze -- Calculating Shortest Paths -- Single Source Shortest Path: Dijkstra's Algorithm -- All Pairs Shortest Paths: Floyd-Warshall Algorithm -- Activity: Improving Floyd-Warshall's Algorithm to Reconstruct the Shortest Path -- Prime Numbers in Algorithms -- Sieve of Eratosthenes -- Prime Factorization -- Activity: Implementing the Sieve of Eratosthenes -- Other Concepts in Graphs -- Minimum Spanning Trees -- A* Search -- Maximum Flow -- Understanding Complexity Classes of Problems -- Summary -- Other Books You May Enjoy -- Index
- Intro -- Title Page -- Copyright and Credits -- Packt Upsell -- Contributors -- Table of Contents -- Preface -- Algorithms and Complexities -- Developing Our First Algorithm -- Algorithm for Converting Binary Numbers to Decimal -- Activity: Writing an Algorithm to Convert Numbers from Octal To Decimal -- Measuring Algorithmic Complexity with Big O Notation -- Complexity Example -- Understanding Complexity -- Activity: Developing a Timing Table Using the Exponential Algorithm -- Complexity Notation -- Identifying the Best and Worst Performance of an Algorithm While Checking for Duplicates in an Array -- Activity: Converting Expressions to Big O Notations -- Identifying Algorithms with Different Complexities -- Linear Complexity -- Quadratic Complexity -- Logarithmic Complexity -- Exponential Complexity -- Constant Complexity -- Activity: Developing a Faster Intersection Algorithm -- Summary -- Sorting Algorithms and Fundamental Data Structures -- Introducing Bubble Sorting -- Understanding Bubble Sorting -- Implementing Bubble Sort -- Improving Bubble Sorting -- Implementing Bubble Sort Improvement -- Activity: Implementing Selection Sort in Java -- Understanding Quick Sort -- Understanding Recursion -- Implementing Binary Search Recursively -- Quicksort Partitioning -- Activity: Understanding the Partitioning Method -- Putting It All Together -- Implementing Quick Sort -- Using Merge Sort -- Dividing the Problem -- Implementing Merge Sort -- Merging the Problem -- Activity: Implementing Merge Sort in Java -- Getting Started with Fundamental Data Structures -- Introducing Data Structures -- Linked Lists Structure -- Converting the Linked List to a Doubly Linked List Structure -- Linked Lists Operations -- Activity: Traversing the Linked List -- Queues -- Adding and Deleting the Elements from the Queue -- Stacks -- Reversing a String
- Modeling Stacks and Queues Using Arrays -- Safe Enqueuing in an Array -- Activity: Evaluating the Postfix Expression -- Summary -- Hash Tables and Binary Search Trees -- Introducing Hash Tables -- Understanding Hash Tables -- Dealing with Collisions with Chaining -- Dealing with Collisions with Open Addressing -- Carrying out the Linear Probing Search Operation -- Remainder and Multiplication Hash Functions -- Implementing the Multiplication Method for a Hash Table -- Universal Hashing -- Activity: Implementing Open Addressing -- Getting Started with Binary Search Trees -- Binary Tree Structure -- Binary Search Tree Operations -- Searching for a Minimum Key in a Binary Tree -- Traversing a Binary Search Tree -- Activity: Implementing BFS in Java -- Balanced Binary Search Trees -- Applying Right Tree Rotation -- Activity: Retrieving the Successor of an Element When the Tree is Traversed in Inorder -- Summary -- Algorithm Design Paradigms -- Introducing Greedy Algorithms -- The Activity Selection Problem -- Solving the Activity Selection Problem -- Ingredients of a Greedy Algorithm -- Optimal Substructure Property -- Greedy Choice Property -- Huffman Coding -- Building a Huffman Code -- Developing an Algorithm to Generate Code Words Using Huffman Coding -- Activity: Implementing a Greedy Algorithm to Compute Egyptian Fractions -- Getting Started with Divide and Conquer Algorithms -- The Divide and Conquer Approach -- The Master Method -- The Closest Pair of Points Problem -- Activity: Solving the Maximum Subarray Problem -- Understanding Dynamic Programming -- Elements of a Dynamic Programming Problem -- Optimal Substructure -- Overlapping Subproblems -- 0-1 Knapsack -- Solving the 0-1 Knapsack Problem Using Recursion -- Longest Common Subsequence -- Activity: The Coin Change Problem -- Summary -- String Matching Algorithms -- Naive Search Algorithm

