Book description
As an experienced JavaScript developer moving to server-side programming, you need to implement classic data structures and algorithms associated with conventional object-oriented languages like C# and Java. This practical guide shows you how to work hands-on with a variety of storage mechanisms—including linked lists, stacks, queues, and graphs—within the constraints of the JavaScript environment.
Determine which data structures and algorithms are most appropriate for the problems you’re trying to solve, and understand the tradeoffs when using them in a JavaScript program. An overview of the JavaScript features used throughout the book is also included.
This book covers:
- Arrays and lists: the most common data structures
- Stacks and queues: more complex list-like data structures
- Linked lists: how they overcome the shortcomings of arrays
- Dictionaries: storing data as key-value pairs
- Hashing: good for quick insertion and retrieval
- Sets: useful for storing unique elements that appear only once
- Binary Trees: storing data in a hierarchical manner
- Graphs and graph algorithms: ideal for modeling networks
- Algorithms: including those that help you sort or search data
- Advanced algorithms: dynamic programming and greedy algorithms
Table of contents
- Preface
- 1. The JavaScript Programming Environment and Model
- 2. Arrays
-
3. Lists
- A List ADT
-
A List Class Implementation
- Append: Adding an Element to a List
- Remove: Removing an Element from a List
- Find: Finding an Element in a List
- Length: Determining the Number of Elements in a List
- toString: Retrieving a Listâs Elements
- Insert: Inserting an Element into a List
- Clear: Removing All Elements from a List
- Contains: Determining if a Given Value Is in a List
- Moving To and Retrieving a List Element
- Iterating Through a List
- Iterating Through a List
- A List-Based Application
- Exercises
- 4. Stacks
- 5. Queues
- 6. Linked Lists
- 7. Dictionaries
- 8. Hashing
- 9. Sets
- 10. Binary Trees and Binary Search Trees
- 11. Graphs and Graph Algorithms
- 12. Sorting Algorithms
- 13. Searching Algorithms
- 14. Advanced Algorithms
- Index
Product information
- Title: Data Structures and Algorithms with JavaScript
- Author(s):
- Release date: March 2014
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449373955
You might also like
book
Tidy First?
Messy code is a nuisance. "Tidying" code, to make it more readable, requires breaking it up …
book
Building Micro-Frontends
What's the answer to today's increasingly complex web applications? Micro-frontends. Inspired by the microservices model, this …
book
Database Internals
When it comes to choosing, using, and maintaining a database, understanding its internals is essential. But …
book
Mythical Man-Month, The: Essays on Software Engineering, Anniversary Edition, 2nd Edition
Few books on software project management have been as influential and timeless as The Mythical Man-Month. …