JavaScript中的数据结构与算法

JavaScript中的数据结构与算法

(美) 麦克米兰 (Michael,M.) , 著

出版社:东南大学出版社

年代:2014

定价:48.0

书籍简介:

作为一名即将迈入服务端编程的有经验的JavaScript开发人员,你需要实现诸如C#和Java这样常见面向对象语言中的类数据结构和算法。这本实用指南为你展示了如何在JavaScript环境中实现各种各样的存储机制——包括链表,堆栈,队列和图。本书将帮助你确定哪种数据结构和算法最适合解决你所面临的问题,以及理解在JavaScript程序中使用它们时的一些折中手段。本书对所有使用的JavaScript特性也作了一一介绍。

书籍目录:

Preface

1. The JavaScript Programming Environment and Model

The JavaScript Environment

JavaScript Programming Practices

Declaring and Initializing Variables

Arithmetic and Math Library Functions in JavaScript

Decision Constructs

Repetition Constructs

Functions

Variable Scope

Recursion

Objects and Object-Oriented Programming

Summary

2. Arrays

JavaScript Arrays Defined

Using Arrays

Creating Arrays

Accessing and Writing Array Elements

Creating Arrays from Strings

Aggregate Array Operations

Accessor Functions

Searching for a Value

String Representations of Arrays

Creating New Arrays from Existing Arrays

Mutator Functions

Adding Elements to an Array

Removing Elements from an Array

Adding and Removing Elements from the Middle of an Array

Putting Array Elements in Order

Iterator Functions

Non-Array-Generating Iterator Functions

Iterator Functions That Return a New Array

Two-Dimensional and Multidimensional Arrays

Creating Two-Dimensional Arrays

Processing Two-Dimensional Array Elements

Jagged Arrays

Arrays of Objects

Arrays in Objects

Exercises

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

Reading Text Files

Using Lists to Manage a Kiosk

Exercises

4. Stacks

Stack Operations

A Stack Implementation

Using the Stack Class

Multiple Base Conversions

Palindromes

Demonstrating Recursion

Exercises

5. Queues

Queue Operations

An Array-Based Queue Class Implementation

Using the Queue Class: Assigning Partners at a Square Dance

Sorting Data with Queues

priority Queues

Exercises

6. Linked Lists

Shortcomings of Arrays

Linked Lists Defined

An Object-Based Linked List Design

The Node Class

The Linked List Class

Inserting New Nodes

Removing Nodes from a Linked List

Doubly Linked Lists

Circularly Linked Lists

Other Linked List Functions

Exercises

7. Dictionaries

The Dictionary Class

Auxiliary Functions for the Dictionary Class

Adding Sorting to the Dictionary Class

Exercises

8. Hashing

An Overview of Hashing

A Hash Table Class

Choosing a Hash Function

A Better Hash Function

Hashing Integer Keys

Storing and Retrieving Data in a Hash Table

Handling Collisions

Separate Chaining

Linear Probing

Exercises

9. Sets

Fundamental Set Definitions, Operations, and Properties

Set Definitions

Set Operations

The Set Class Implementation

More Set Operations

Exercises

10. Binary Trees and Binary Search Trees

Trees Defined

Binary Trees and Binary Search Trees

Building a Binary Search Tree Implementation

Traversing a Binary Search Tree

BST Searches

Searching for the Minimum and Maximum Value

Searching for a Specific Value

Removing Nodes from a BST

Counting Occurrences

Exercises

11. Graphs and Graph Algorithms

Graph Definitions

Real-World Systems Modeled by Graphs

The Graph Class

Representing Edges

Building a Graph

Searching a Graph

Depth-First Search

Breadth-First Search

Finding the Shortest Path

Breadth-First Search Leads to Shortest Paths

Determining Paths

Topological Sorting

An Algorithm for Topological Sorting

Implementing the Topological Sorting Algorithm

Exercises

12. Sorting Algorithms

An Array Test Bed

Generating Random Data

Basic Sorting Algorithms

Bubble Sort

Selection Sort

Insertion Sort

Timing Comparisons of the Basic Sorting Algorithms

Advanced Sorting Algorithms

The Shellsort Algorithm

The Mergesort Algorithm

The Quicksort Algorithm

Exercises

13. Searching Algorithms

Commonly Used Functions in Examples

Searching for Minimum and Maximum Values

Using Self-Organizing Data

Binary Search

Counting Occurrences

Searching Textual Data

Exercises

14. Advanced Algorithms

Dynamic Programming

A Dynamic Programming Example: Computing Fibonacci Numbers

Finding the Longest Common Substring

The Knapsack Problem: A Recursive Solution

The Knapsack Problem: A Dynamic Programming Solution

Greedy Algorithms

A First Greedy Algorithm Example: The Coin-Changing Problem

A Greedy Algorithm Solution to the Knapsack Problem

Exercises

Index

内容摘要:

JavaScript程序员因而迫切需要使用传统语言(比如C和Java)提供的工具,包括传统的数据结构以及传统的排序和查找算法。《JavaScript中的数据结构与算法(影印版)》讨论在数组即对象、无处不在的全局变量、基于原型的对象模型等JavaScript语言的环境下,如何实现高效的数据结构和算法。

书籍规格:

书籍详细信息
书名JavaScript中的数据结构与算法站内查询相似图书
9787564153458
如需购买下载《JavaScript中的数据结构与算法》pdf扫描版电子书或查询更多相关信息,请直接复制isbn,搜索即可全网搜索该ISBN
出版地南京出版单位东南大学出版社
版次影印本印次1
定价(元)48.0语种英文
尺寸24 × 17装帧平装
页数印数

书籍信息归属:

JavaScript中的数据结构与算法是东南大学出版社于2015.2出版的中图分类号为 TP312 的主题关于 JAVA语言-程序设计-英文 的书籍。