My Account Log in

1 option

Hands-on data structures and algorithms with JavaScript : write efficient code that is highly performant, scalable, and easily testable using JavaScript / Kashyap Mukkamala.

Ebook Central College Complete Available online

View online
Format:
Book
Author/Creator:
Mukkamala, Kashyap, author.
Language:
English
Subjects (All):
JavaScript (Computer program language).
Data structures (Computer science).
Physical Description:
1 online resource (325 pages) : illustrations
Edition:
1st ed.
Place of Publication:
Birmingham, England ; Mumbai, [India] : Packt, 2018.
Summary:
Data structures and algorithms are the fundamental building blocks of computer programming. They are critical to any problem, provide a complete solution, and act like reusable code. Using appropriate data structures and having a good understanding of algorithm analysis are key in JavaScript to solving crises and ensuring your application is.
Contents:
Cover
Copyright and Credits
PacktPub.com
Contributors
Table of Contents
Preface
Chapter 1: Building Stacks for Application State Management
Prerequisites
Terminology
API
Don't we have arrays for this?
Creating a stack
Implementing stack methods
Testing the stack
Using the stack
Use cases
Creating an Angular application
Installing Angular CLI
Creating an app using the CLI
Creating a custom back button for a web application
Setting up the application and its routing
Detecting application state changes
Laying out the UI
Navigating between states
Final application logic
Building part of a basic JavaScript syntax parser and evaluator
Building a basic web worker
Basic web worker communication
Enabling web worker communications
Transforming input to machine-understandable expression
Converting infix to postfix expressions
Evaluating postfix expressions
Summary
Chapter 2: Creating Queues for In-Order Executions
Types of queue
Implementing APIs
Creating a queue
A simple queue
Testing the queue
Priority Queue
Testing a priority queue
Use cases for queues
Creating a Node.js application
Starting the Node.js server
Creating a chat endpoint
Implementing logging using priority queues
Comparing performance
Running benchmark tests
Chapter 3: Using Sets and Maps for Faster Applications
Exploring the origin of sets and maps
Analyzing set and map types
How weak is WeakMap?
Memory management
API differences
Sets versus WeakSets
Understanding WeakSets
The API difference
Creating custom keyboard shortcuts for your application
Creating states with keymap.
Activity tracking and analytics for web applications
Creating the Angular application
Performance comparison
Sets and Arrays
Maps and Objects
Chapter 4: Using Trees for Faster Lookup and Modifications
Creating a typeahead lookup
Creating a trie tree
Implementing the add() method
The friends' example
Implementing the search() method
Retaining remainders at nodes
The final form
Creating a credit card approval predictor
ID3 algorithm
Calculating target entropy
Calculating branch entropy
The final information gain per branch
Coding the ID3 algorithm
Generating training dataset
Generating the decision tree
Predicting outcome of sample inputs
Visualization of the tree and output
Chapter 5: Simplify Complex Applications Using Graphs
Types of graphs
Creating a Node.js web server
Creating a reference generator for a job portal
Creating a bidirectional graph
Generating a pseudocode for the shortest path generation
Implementing the shortest path generation
Creating a web server
Running the reference generator
Creating a friend recommendation system for social media
Understanding PageRank algorithm
Understanding Personalized PageRank (PPR) Algorithm
Pseudocode for personalized PageRank
Implementing Personalized PageRank
Results and analysis
Chapter 6: Exploring Types of Algorithms
Using recursion to serialize data
Pseudocode
Serializing data
Using Dijkstra to determine the shortest path
Pseudo code
Implementing Dijkstra's algorithm
Using BFS to determine relationships
Implementing BFS
Using dynamic programming to build a financial planner
Pseudo code.
Implementing the dynamic programming algorithm
Using a greedy algorithm to build a travel itinerary
Understanding spanning trees
Implementing a minimum spanning tree using a greedy algorithm
Using branch and bound algorithm to create a custom shopping list
Understanding branch and bound algorithm
Implementing branch and bound algorithm
When not to use brute-force algorithm
Brute-force Fibonacci generator
Recursive Fibonacci generator
Memoized Fibonacci generator
Chapter 7: Sorting and Its Applications
Types of sorting algorithms
Use cases of different sorting algorithms
Creating an Express server
Mocking library books data
Insertionsort API
What is Insertionsort
Implementing Insertionsort API
Mergesort API
What is Mergesort
Implementing Mergesort API
Quicksort API
What is Quicksort
Implementing the Quicksort API
Lomuto Partition Scheme
Hoare Partition Scheme
Chapter 8: Big O Notation, Space, and Time Complexity
Asymptotic Notations
Big-O notation
Omega notation
Theta Notation
Recap
Examples of time complexity
Constant time
Logarithmic time
Linear time
Quadratic time
Polynomial time
Polynomial time complexity classes
Recursion and additive complexity
Space complexity and Auxiliary space
Examples of Space complexity
Constant space
Linear space
Chapter 9: Micro-Optimizations and Memory Management
Best practices
Best practices for HTML
Declaring the correct DOCTYPE
Adding the correct meta-information to the page
Dropping unnecessary attributes
Making your app mobile ready
Loading style sheets in the &lt
head&gt
Avoiding inline styles
Using semantic markup.
Using Accessible Rich Internet Applications (ARIA) attributes
Loading scripts at the end
CSS best practices
Do not use !important
Arranging styles within a class alphabetically
Defining the media queries in an ascending order
Best practices for JavaScript
Avoiding polluting the global scope
Using 'use strict'
Strict checking (== vs ===)
Using ternary operators and Boolean || or &amp
&amp
Modularization of code
Avoiding pyramid of doom
Keeping DOM access to a minimum
Validating all data
Do not reinvent the wheel
HTML optimizations
DOM structuring
Prefetching and preloading resources
&lt
link rel=prefetch &gt
link rel=preload &gt
Layout and layering of HTML
The HTML layout
HTML layers
CSS optimizations
Coding practices
Using smaller values for common ENUM
Using shorthand properties
Avoiding complex CSS selectors
Understanding the browser
Avoiding repaint and reflow
Critical rendering path (CRP)
JavaScript optimizations
Truthy/falsy comparisons
Looping optimizations
The conditional function call
Image and font optimizations
Garbage collection in JavaScript
Mark and sweep algorithm
Garbage collection and V8
Avoiding memory leaks
Assigning variables to global scope
Removing DOM elements and references
Closures edge case
What's next?
Other Books You May Enjoy
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (EBC, viewed March 6, 2018).

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