• Complain

Michael McMillan - Data Structures and Algorithms with JavaScript

Here you can read online Michael McMillan - Data Structures and Algorithms with JavaScript full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2014, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Michael McMillan Data Structures and Algorithms with JavaScript
  • Book:
    Data Structures and Algorithms with JavaScript
  • Author:
  • Publisher:
    OReilly Media
  • Genre:
  • Year:
    2014
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Data Structures and Algorithms with JavaScript: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Data Structures and Algorithms with JavaScript" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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 mechanismsincluding linked lists, stacks, queues, and graphswithin the constraints of the javascript environment.
Determine which data structures and algorithms are most appropriate for the problems youre 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

Michael McMillan: author's other books


Who wrote Data Structures and Algorithms with JavaScript? Find out the surname, the name of the author of the book and a list of all author's works by series.

Data Structures and Algorithms with JavaScript — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Data Structures and Algorithms with JavaScript" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Data Structures and Algorithms with JavaScript
Michael McMillan
Preface

Over the past few years, JavaScript has been used more and more as a server-side computer programming language owing to platforms such as Node.js and SpiderMonkey. Now that JavaScript programming is moving out of the browser, programmers will find they need to use many of the tools provided by more conventional languages, such as C++ and Java. Among these tools are classic data structures such as linked lists, stacks, queues, and graphs, as well as classic algorithms for sorting and searching data. This book discusses how to implement these data structures and algorithms for server-side JavaScript programming.

JavaScript programmers will find this book useful because it discusses how to implement data structures and algorithms within the constraints that JavaScript places them, such as arrays that are really objects, overly global variables, and a prototype-based object system. JavaScript has an unfair reputation as a bad programming language, but this book demonstrates how you can use JavaScript to develop efficient and effective data structures and algorithms using the languages good parts.

Why Study Data Structures and Algorithms

I am assuming that many of you reading this book do not have a formal education in computer science. If you do, then you already know why studying data structures and algorithms is important. If you do not have a degree in computer science or havent studied these topics formally, you should read this section.

The computer scientist Nicklaus Wirth wrote a computer programming textbook titled Algorithms + Data Structures = Programs (Prentice-Hall). That title is the essence of computer programming. Any computer program that goes beyond the trivial Hello, world! will usually require some type of structure to manage the data the program is written to manipulate, along with one or more algorithms for translating the data from its input form to its output form.

For many programmers who didnt study computer science in school, the only data structure they are familiar with is the array. Arrays are great for some problems, but for many complex problems, they are simply not sophisticated enough. Most experienced programmers will admit that for many programming problems, once they come up with the proper data structure, the algorithms needed to solve the problem are easier to design and implement.

An example of a data structure that leads to efficient algorithms is the binary search tree (BST). A binary search tree is designed so that it is easy to find the minimum and maximum values of a set of data, yielding an algorithm that is more efficient than the best search algorithms available. Programmers unfamiliar with BSTs will instead probably use a simpler data structure that ends up being less efficient.

Studying algorithms is important because there is always more than one algorithm that can be used to solve a problem, and knowing which ones are the most efficient is important for the productive programmer. For example, there are at least six or seven ways to sort a list of data, but knowing that the Quicksort algorithm is more efficient than the selection sort algorithm will lead to a much more efficient sorting process. Or that its fairly easy to implement a sequential or linear search algorithm for a list of data, but knowing that the binary sort algorithm can sometimes be twice as efficient as the sequential search will lead to a better program.

The comprehensive study of data structures and algorithms teaches you not only which data structures and which algorithms are the most efficient, but you also learn how to decide which data structures and which algorithms are the most appropriate for the problem at hand. There will often be trade-offs involved when writing a program, especially in the JavaScript environment, and knowing the ins and outs of the various data structures and algorithms covered in this book will help you make the proper decision for any particular programming problem you are trying to solve.

What You Need for This Book

The programming environment we use in this book is the JavaScript shell based on the provides instructions on downloading the shell for your environment. Other shells will work as well, such as the Node.js JavaScript shell, though you will have to make some translations for the programs in the book to work in Node. Other than the shell, the only thing you need is a text editor for writing your JavaScript programs.

Organization of the Book
  • presents an overview of the JavaScript language, or at least the features of the JavaScript language used in this book. This chapter also demonstrates through use the programming style used throughout the other chapters.
  • discusses the most common data structure in computer programming: the array, which is native to JavaScript.
  • introduces the first implemented data structure: the list.
  • are used throughout computer science in both compiler and operating system implementations.
  • Queues are an abstraction of the lines you stand in at a bank or the grocery store. Queues are used extensively in simulation software where data has to be lined up before it is processed.
  • . A linked list is a modification of the list data structure, where each element is a separate object linked to the objects on either side of it. Linked lists are efficient when you need to perform multiple insertions and deletions in your program.
  • which are data structures that store data as key-value pairs.
  • One way to implement a dictionary is to use a hash table, and discusses how to build hash tables and the hash algorithms that are used to store data in the table.
  • Sets are often not covered in data structure books, but they can be useful for storing data that is not supposed to have duplicates in the data set.
  • Binary trees and binary search trees are the subject of As mentioned earlier, binary search trees are useful for storing data that needs to be stored originally in sorted form.
  • Graphs are used to represent data such as the nodes of a computer network or the cities on a map.
  • from data structures to algorithms and discusses various algorithms for sorting data, including both simple sorting algorithms that are easy to implement but are not efficient for large data sets, and more complex algorithms that are appropriate for larger data sets.
  • this time searching algorithms such as sequential search and binary search.
  • The last chapter of the book, These algorithms are useful for solving hard problems where a more traditional algorithm is either too slow or too hard to implement. We examine some classic problems for both dynamic programming and greedy algorithms in the chapter.
Conventions Used in This Book

The following typographical conventions are used in this book:

Italic Indicates new terms, URLs, email addresses, filenames, and file extensions. Constant width Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords. Constant width bold Shows commands or other text that should be typed literally by the user. Constant width italic Shows text that should be replaced with user-supplied values or by values determined by context.
Using Code Examples

Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/oreillymedia/data_structures_and_algorithms_using_javascript.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Data Structures and Algorithms with JavaScript»

Look at similar books to Data Structures and Algorithms with JavaScript. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Data Structures and Algorithms with JavaScript»

Discussion, reviews of the book Data Structures and Algorithms with JavaScript and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.