/javascript-patterns

A collection of javascript algorithms, patterns, and techniques

Primary LanguageJavaScriptMIT LicenseMIT

JavaScript Algorithms, Design Patterns, and Techniques

Build Status Codecov Status

This repository contains common algorithms, design patters, and techniques implemented in JavaScript. Code here is best used for learning purposes and practice. Contributing to this repo is appreciated and requested, especially if you're trying to learn JavaScript!

Note: Code from this repository should not be used in production! There are likely much more robust and well-tested built-in methods or npm packages to accomplish any task

Contents

Algorithms

  • Sorting

    • Merge Sort
    • Quick Sort
    • TODO: Bucket Sort
    • TODO: Heap Sort
    • TODO: Counting Sort
    • TODO: Internal Sort
    • TODO: External SOrt
    • TODO: Bubble Sort
    • TODO: Selection Sort
    • TODO: Insertion Sort
  • Searching

    • TODO: Linear Search
    • TODO: Binary Search
    • TODO: Jump Search
    • TODO: Interpolation Search
    • TODO: Exponential Search
    • TODO: Sublist Search (Search a linked list in another list)
    • TODO: Fibonacci Search
    • TODO: The Ubiquitous Binary Search

Patterns

  • Observer
  • Revealing Module (Tests needed)
  • Singleton (Tests needed)

Techniques

  • Memoize (Tests needed)

Contributing

Contributing to this repository is appreciated and requested! Please look at the list above and select a section that has TODO next to it, or one that needs testing. In the former case, please add both the content of that section as well as matching tests in the tests directory. Please Check the open issues before working on anything to make sure someone else isn't working on it already. If it looks available, open a new issue detailing what you plan to work on and I will verify no one else is working on it. Thank you!