My Account Log in

2 options

Learning JavaScript data structures and algorithms : write complex and powerful JavaScript code using the latest ECMAScript / Loiane Groner.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central Academic Complete Available online

View online
Format:
Book
Author/Creator:
Groner, Loiane, author.
Language:
English
Subjects (All):
Java (Computer program language).
Data structures (Computer science).
Application software--Development.
Application software.
Physical Description:
1 online resource (419 pages)
Edition:
Third edition.
Place of Publication:
Birmingham ; Mumbai : Packt, [2018]
Summary:
A data structure is a particular way of organizing data in a computer to utilize resources efficiently. Data structures and algorithms are the base of every solution to any programming problem. With this book, you will learn to write complex and powerful code using the latest ES 8 features.
Contents:
Cover
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Table of Contents
Preface
Chapter 1: JavaScript - A Quick Overview
JavaScript data structure and algorithms
Setting up the environment
The minimum setup to work with JavaScript
Using web servers
Node.js http-server
JavaScript basics
Variables
Scope variable
Operators
Truthy and falsy
Functions of the equals operators (== and ===)
Control structures
Conditional statements
Loops
Functions
Object-oriented programming in JavaScript
Debugging and tools
Debugging with VSCode
Summary
Chapter 2: ECMAScript and TypeScript Overview
ECMAScript or JavaScript?
ES6, ES2015, ES7, ES2016, ES8, ES2017, and ES.Next
The compatibility table
Using Babel.js
ECMAScript 2015+ functionalities
let and const instead of var
Variables scope with let and const
Template literals
Arrow functions
Default parameter values for functions
Declaring the spread and rest operators
Enhanced object properties
Object-oriented programming with classes
Inheritance
Working with getters and setters
Exponentiation operator
Modules
Running ES2015 modules in the browser and with Node.js
Using native ES2015 imports in Node.js
Running ES2015 modules in the browser
ES2015+ backward compatibility
Introducing TypeScript
Type inference
Interfaces
Generics
Other TypeScript functionalities
TypeScript compile-time checking in JavaScript files
Chapter 3: Arrays
Why should we use arrays?
Creating and initializing arrays
Accessing elements and iterating an array
Adding elements
Inserting an element at the end of the array
Using the push method
Inserting an element in the first position
Using the unshift method
Removing elements.
Removing an element from the end of the array
Removing an element from the first position
Using the shift method
Adding and removing elements from a specific position
Two-dimensional and multi-dimensional arrays
Iterating the elements of two-dimensional arrays
Multi-dimensional arrays
References for JavaScript array methods
Joining multiple arrays
Iterator functions
Iterating using the every method
Iterating using the some method
Iterating using forEach
Using map and filter
Using the reduce method
ECMAScript 6 and new array functionalities
Iterating using the for...of loop
Using the @@iterator object
Array entries, keys, and values
Using the from method
Using the Array.of method
Using the fill method
Using the copyWithin method
Sorting elements
Custom sorting
Sorting strings
Searching
ECMAScript 2015 - the find and findIndex methods
ECMAScript 2016 - using the includes method
Outputting the array into a string
The TypedArray class
Arrays in TypeScript
Chapter 4: Stacks
Creating a JavaScript data structure and algorithm library
The stack data structure
Creating an array-based Stack class
Pushing elements to the stack
Popping elements from the stack
Peeking the element from the top of the stack
Verifying whether the stack is empty
Clearing the elements of the stack
Using the Stack class
Creating a JavaScript object-based Stack class
Verifying whether the stack is empty and its size
Peeking the top of the stack and clearing it
Creating the toString method
Protecting the internal elements of the data structure
The underscore naming convention
ES2015 classes with scoped symbols
ES2015 classes with WeakMap.
ECMAScript class field proposal
Solving problems using stacks
Converting decimal numbers to binary
The base converter algorithm
Chapter 5: Queues and Deques
The queue data structure
Creating the Queue class
Enqueuing elements to the queue
Dequeuing elements from the queue
Peeking the element from the front of the queue
Verifying whether the queue is empty and its size
Clearing the queue
Using the Queue class
The deque data structure
Creating the Deque class
Adding elements to the front of the deque
Using the Deque class
Solving problems using queues and deques
The circular queue - Hot Potato
Palindrome checker
JavaScript task queues
Chapter 6: Linked Lists
The linked list data structure
Creating the LinkedList class
Pushing elements to the end of the linked list
Removing elements from the linked list from a specific position
Looping through the list until we get to the desired position
Refactoring the remove method
Inserting an element at any position
The indexOf method: returning the position of an element
Removing an element from the linked list
The isEmpty, size, and getHead methods
The toString method
Doubly linked lists
Inserting a new element at any position
Removing elements from any position
Circular linked lists
Sorted linked lists
Inserting elements in order
Creating the StackLinkedList class
Chapter 7: Sets
Structuring a dataset
Creating a Set class
The has(element) method
The add method
The delete and clear methods
The size method
The values method
Using the Set class
Set operations
Set union
Set intersection.
Improving the intersection method
Set difference
Subset
ECMAScript 2015 - the Set class
ES2015 Set class operations
Simulating the union operation
Simulating the intersection operation
Simulating the difference operation
Using the spread operator
Multisets or bags
Chapter 8: Dictionaries and Hashes
The dictionary data structure
Creating the Dictionary class
Verifying whether a key exists in the dictionary
Setting a key and value in the dictionary and the ValuePair class
Removing a value from the dictionary
Retrieving a value from the dictionary
The keys, values, and valuePairs methods
Iterating each ValuePair of the dictionary with forEach
The clear, size, isEmpty, and toString methods
Using the Dictionary class
The hash table
Creating a HashTable class
Creating a hash function
Putting a key and a value in the hash table
Retrieving a value from the hash table
Removing a value from the hash table
Using the HashTable class
Hash table versus hash set
Handling collisions between hash tables
Separate chaining
The put method
The get method
The remove method
Linear probing
Creating better hash functions
The ES2015 Map class
The ES2015 WeakMap and WeakSet classes
Chapter 9: Recursion
Understanding recursion
Calculating the factorial of a number
Iterative factorial
Recursive factorial
The call stack
JavaScript limitation on the call stack size
The Fibonacci sequence
Iterative Fibonacci
Recursive Fibonacci
Fibonacci with memoization
Why use recursion? Is it faster?
Chapter 10: Trees
The tree data structure
Tree terminology
The binary and binary search trees
Creating the Node and BinarySearchTree classes.
Inserting a key into the BST
Tree traversal
In-order traversal
Pre-order traversal
Post-order traversal
Searching for values in a tree
Searching for minimum and maximum values
Searching for a specific value
Removing a node
Removing a leaf node
Removing a node with a left or right child
Removing a node with two children
Self-balancing trees
Adelson-Velskii and Landi's tree (AVL tree)
Height of a node and the balancing factor
Balancing operations- AVL rotations
Left-left case: single rotation to the right
Right-right case: single rotation to the left
Left-right case: double rotation to the right
Right-left case - double rotation to the left
Inserting a node in the AVL tree
Removing a node from the AVL tree
Red-Black tree
Inserting a node in the Red-Black tree
Verifying the Red-Black tree properties after insertion
Red-Black tree rotations
Chapter 11: Binary Heap and Heap Sort
The binary heap data structure
Creating the MinHeap class
Binary tree array representation
Inserting a value into the heap
The sift up operation
Finding the minimum or maximum value from the heap
Extracting the minimum or maximum value from the heap
The sift down operation (heapify)
Creating the MaxHeap class
The heap sort algorithm
Chapter 12: Graphs
Graph terminology
Directed and undirected graphs
Representing a graph
The adjacency matrix
The adjacency list
The incidence matrix
Creating the Graph class
Graph traversals
Breadth-first search (BFS)
Finding the shortest paths using BFS
Further study on the shortest paths algorithms
Depth-first search (DFS)
Exploring the DFS algorithm
Topological sorting using DFS
Shortest path algorithms
Dijkstra's algorithm
The Floyd-Warshall algorithm.
Minimum spanning tree (MST).
Notes:
Description based on print version record.
OCLC:
1035516052

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Library Catalog Using Articles+ Library Account