Data Structures and Algorithms with JavaScript
Bringing classic computing approaches to the Web
Publisher: O'Reilly Media
Final Release Date: March 2014
Pages: 250

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
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyData Structures and Algorithms with JavaScript
 
3.1

(based on 12 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (5)

  • 3 Stars

     

    (2)

  • 2 Stars

     

    (2)

  • 1 Stars

     

    (2)

67%

of respondents would recommend this to a friend.

Pros

  • Easy to understand (8)
  • Well-written (6)
  • Concise (4)
  • Helpful examples (4)
  • Accurate (3)

Cons

  • Not comprehensive enough (3)
  • Too basic (3)
  • Too many errors (3)

Best Uses

  • Intermediate (5)
  • Novice (5)
  • Student (4)
    • Reviewer Profile:
    • Developer (10), Educator (4), Designer (3)

Reviewed by 12 customers

Sort by

Displaying reviews 1-10

Back to top

Previous | Next »

 
3.0

Basic DS&Algo

By MonkeyIsNull

from Washington, DC

About Me Developer

Verified Reviewer

Pros

  • Easy to understand
  • Well-written

Cons

    Best Uses

    • Novice

    Comments about oreilly Data Structures and Algorithms with JavaScript:

    If JavaScript is your choice of programming languages, and you don't already know basic Data Structures and Algorithms, then this could be a good place to start. It does contain an odd choice of JavaScript Engines in Mozilla's JavaScript Shell, but, as pointed out, to work in Node the examples would have to have been modified which likely cloud the examples. However, most people implementing the stuff in this book are going to need to convert them to Node, or at least have them work in a Web Browser environment. That's just the way things are right now.
    What's covered is Basic stuff in Lists, Stacks and Queues all the way up to Greedy Algorithms. Each chapter starts out with an explanation of the Data Structure or Algorithm, usually followed by well-done diagrams. The code, in the ebook at least, has followed the lastest O'Reilly trend of colorzing the code so it's easier to read.
    The only other book covering the same subject matter that I've ever actually used on the job is Mastering Algorithms with Perl, which weighs in at 684 pages with the index. DSaAwJS only hits 246 - it's an unfair comparison - but it's the only one I can really make. The Perl book, as indicated by the page count covers a lot more territory and goes into quite a bit more depth. However, that's not what you always want. Back when I used Perl, and I was writing stuff that needed more ... unusual problem solving, that was a good book, but if you're just looking for a straight forward shot in JavaScript, this might be more your thing.
    I can't speak to whether all the code examples work as I didn't try every single one, but there's been at least one update as of this review, so that should have fixed what problems there were. The bottom line: I wasn't blown away, but the presentation and writing are solid.
    I was given this book to review as part of the O'Reilly Blogger Program.

    (1 of 1 customers found this review helpful)

     
    4.0

    Got tons of potential, but... (PART 2)

    By konstantin

    from new york

    About Me Designer, Developer, Educator, Maker, Sys Admin

    Verified Reviewer

    Pros

    • Easy to understand

    Cons

      Best Uses

      • Expert
      • Intermediate
      • Novice
      • Student

      Comments about oreilly Data Structures and Algorithms with JavaScript:

      I wrote a review 3 days ago asking if the ebook gets updated(due to typos and errors) and i am happy to see that it did today. Maybe there is hope after all. Thanks Oreilly

      K

       
      3.0

      Got tons of potential, but...

      By konstantin

      from new york

      About Me Developer

      Verified Reviewer

      Pros

      • Easy to understand
      • Well-written

      Cons

      • Too many errors

      Best Uses

      • Expert

      Comments about oreilly Data Structures and Algorithms with JavaScript:

      This book has a lot potential. I love the way things are being explained etc, but its just so hard to get the samples to work. There are so many typos it becomes frustrating. If you can figure things out yourself then fine, but that takes time. I have been truly enlighten on some topics but once it comes to see it in action it becomes a problem. Do the ebooks get updated ? does the author send in requests to have certain pages updated? or once it out its not, no turning back. at least the ebooks deserves an update.

       
      2.0

      For beginners

      By revda

      from Sophia Antipolis, France

      About Me Developer

      Verified Buyer

      Pros

      • Easy to understand
      • Helpful examples

      Cons

      • Too basic

      Best Uses

      • Novice

      Comments about oreilly Data Structures and Algorithms with JavaScript:

      Basic data structures with buggy/non standard/outdated implementation.

      (2 of 2 customers found this review helpful)

       
      1.0

      Did anyone edit this book?

      By Jason Mulligan

      from Ottawa, ON, CA

      About Me Designer, Developer, Educator, Maker, Sys Admin

      Pros

        Cons

        • Not comprehensive enough
        • Too basic
        • Too many errors

        Best Uses

        • Student

        Comments about oreilly Data Structures and Algorithms with JavaScript:

        Practically every code sample is erroneous. There's barely enough substance/theory to justify this book. I find this ironic, considering the opening paragraphs.

        (1 of 1 customers found this review helpful)

         
        4.0

        Worth a read

        By Rich

        from London

        About Me Developer

        Verified Buyer

        Pros

        • Concise
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Student

          Comments about oreilly Data Structures and Algorithms with JavaScript:

          This is a good book and is worth a read.

          The only negatives are that it teaches some bad habits e.g. declaring objects as functions vs. variables and not making good use of native functions e.g. Array methods. I'd recommend reading O'Reilly's JavaScript The Good Parts first and making good use of MDN. There are some errors in the code e.g. the linked list iterators don't work, but it's a decent exercise to get them working. The downloadable code is more up to date than the book.

          I thought the examples and exercises were pretty useful. Overall it's a good JS book to read if you're trying to deepen your understanding of the language beyond just simple website scripting and I recommend it.

          (2 of 3 customers found this review helpful)

           
          1.0

          Poor example code, only enough theory.

          By Glutnix

          from Wellington, NZ

          About Me Developer, Educator

          Verified Reviewer

          Pros

          • Good Outline
          • Well-written

          Cons

          • Difficult to understand
          • Inaccurate Code
          • Too many errors

          Best Uses

          • Intermediate
          • Novice

          Comments about oreilly Data Structures and Algorithms with JavaScript:

          The book's outline is solid, and presents the theory of the code well. However, the source code in many of the sections does not work. The book is riddled with syntax errors, untested code.

          (1 of 1 customers found this review helpful)

           
          4.0

          Hard concepts can be expressed easily

          By miro

          from Banja Luka BiH

          About Me Developer

          Verified Buyer

          Pros

          • Accurate
          • Concise
          • Easy to understand

          Cons

          • Code Examples Link Broken

          Best Uses

          • Intermediate

          Comments about oreilly Data Structures and Algorithms with JavaScript:

          Algorithms and data structures are considered to be very hard topic - and they are mostly studied on the university level of education. That is why they are beeing avoided by many web developers and self study programmers. But, at the same time, this topic is very valuable piece of personal knowledge. By knowing datastructures and algorithms you know crucial programming concepts that represents roots for every modern programming language. Without them, something will always be missing. I was trying to learn them from heavy 1000 pages books, that are filled with hard core math and complex theory. And it wasnt working - so I keep searching for the right book from that field. And I found this book, which is covering one very important concept in a very "gentle" and pragmatic way.
          Every web developer who is searching to fill the gap of not owning some formal education, will find this book very valuable.

           
          4.0

          JavaScript-specific implementations

          By steve

          from Jackson MS

          About Me Designer, Developer

          Verified Buyer

          Pros

          • Accurate
          • Concise
          • Easy to understand
          • Helpful examples
          • Well-written

          Cons

          • Not comprehensive enough

          Best Uses

          • Intermediate

          Comments about oreilly Data Structures and Algorithms with JavaScript:

          Good examples of a limited number of data structures in JavaScript. I will be implementing the Set Class in my applications.
          I would have liked more about finding paths beyond binary trees.

          (2 of 2 customers found this review helpful)

           
          5.0

          Solid overview of algorithms in JS

          By LarryQ

          from CA

          Pros

          • Easy Read
          • Helpful examples

          Cons

            Best Uses

              Comments about oreilly Data Structures and Algorithms with JavaScript:

              I'm not sure what the previous reviewer's gripe was-- this book covers most of the essential CS algorithms and data structures, up to and including the Knapsack problem, in an easy to read fashion, which is no small achievement in this field.

              Any algorithms book using javascript is going to rely on arrays, and the author does us a favor by including an early chapter on best practices in that regard, useful for the remainder of the book.

              If you're looking for advanced string matching algorithms or in-depth treatment on the analysis of algorithms this is not your book, nor does it suggest to be. For a good read on how to implement common data structure or algorithm X in javascript, it's a must have.

              Displaying reviews 1-10

              Back to top

              Previous | Next »

               
              Buy 2 Get 1 Free Free Shipping Guarantee
              Buying Options
              Immediate Access - Go Digital what's this?
              Ebook: $33.99
              Formats:  DAISY, ePub, Mobi, PDF
              Print & Ebook: $43.99
              Print: $39.99