更新时间:2021-08-13 15:58:04
封面
Title Page
Copyright and Credits
Beginning Java Data Structures and Algorithms
Packt Upsell
Why Subscribe?
PacktPub.com
Contributors
About the Author
Packt Is Searching for Authors like You
Preface
Who This Book Is For
What This Book Covers
To Get the Most out of This Book
Download the Example Code Files
Download the Color Images
Conventions Used
Get in Touch
Reviews
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
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
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