Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: parkerproject/javascript-algorithms-1
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: trekhleb/javascript-algorithms
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on May 25, 2018

  1. Finish main part of translation (trekhleb#18)

    * add chinese overview
    
    * translate
    
    * add
    
    * translate english
    kj-huang authored and trekhleb committed May 25, 2018
    Copy the full SHA
    e26e986 View commit details
  2. Update READMEs.

    trekhleb committed May 25, 2018
    Copy the full SHA
    0fe62a8 View commit details
  3. Update READMEs.

    trekhleb committed May 25, 2018
    Copy the full SHA
    48195d4 View commit details
  4. Added Linear Search (trekhleb#20)

    Added algorithm for the basic and useful linear search
    ak4522912 authored and trekhleb committed May 25, 2018
    Copy the full SHA
    7ed425e View commit details
  5. Add linear search.

    trekhleb committed May 25, 2018
    Copy the full SHA
    2e3860f View commit details

Commits on May 27, 2018

  1. Copy the full SHA
    f93d12d View commit details
  2. Add in-place sort to QuickSort.js (trekhleb#16)

    * Add in-place sort to QuickSort.js
    
    * Fix linting errors and clean up comments
    
    * Change implementation to address lint errors
    
    * Trailing space and undefined variable
    
    * Create own class for in-place quicksort and use tests
    
    * Add trailing space at end of file
    
    * Fix placement of visitedCallback, explain itial destructuring
    robtaussig authored and trekhleb committed May 27, 2018
    Copy the full SHA
    bf5d7b3 View commit details
  3. Copy the full SHA
    30ae323 View commit details

Commits on May 29, 2018

  1. Use Map for TrieNode children (trekhleb#27)

    caub authored and trekhleb committed May 29, 2018
    Copy the full SHA
    b1a613e View commit details
  2. Add counting sort.

    trekhleb committed May 29, 2018
    Copy the full SHA
    0c1f685 View commit details
  3. Add counting sort.

    trekhleb committed May 29, 2018
    Copy the full SHA
    e3ff82f View commit details
  4. Add counting sort.

    trekhleb committed May 29, 2018
    Copy the full SHA
    cca138a View commit details
  5. Radix sort (trekhleb#28)

    * Add in-place sort to QuickSort.js
    
    * Fix linting errors and clean up comments
    
    * Change implementation to address lint errors
    
    * Trailing space and undefined variable
    
    * Create own class for in-place quicksort and use tests
    
    * Add trailing space at end of file
    
    * Fix placement of visitedCallback, explain itial destructuring
    
    * Implement Radix Sort
    
    Remove excess line
    
    Reorganize RadixSort of match structure of other classes
    
    Write tests for RadixSort and additional test constants
    
    Create README
    
    Update main readme to include radix sort
    robtaussig authored and trekhleb committed May 29, 2018
    Copy the full SHA
    7198533 View commit details
  6. Copy the full SHA
    afd5617 View commit details
  7. Add Radix Sort illustration.

    trekhleb committed May 29, 2018
    Copy the full SHA
    caec97e View commit details
  8. Code style fixes.

    trekhleb committed May 29, 2018
    Copy the full SHA
    625217a View commit details

Commits on May 30, 2018

  1. Copy the full SHA
    3ae9c40 View commit details
  2. Copy the full SHA
    797a6f2 View commit details
  3. Code style fixes.

    trekhleb committed May 30, 2018
    Copy the full SHA
    8d868ae View commit details
  4. Code style fixes.

    trekhleb committed May 30, 2018
    Copy the full SHA
    fcc5463 View commit details
  5. Copy the full SHA
    b7e27b2 View commit details
  6. Copy the full SHA
    b62d9a4 View commit details
  7. Update CONTRIBUTING.md

    trekhleb authored May 30, 2018
    Copy the full SHA
    62efb29 View commit details

Commits on May 31, 2018

  1. Copy the full SHA
    c18fd63 View commit details
  2. Copy the full SHA
    33ac110 View commit details
  3. Copy the full SHA
    02d7abc View commit details
  4. Copy the full SHA
    e572de6 View commit details
  5. Use Map for node meta data.

    trekhleb committed May 31, 2018
    Copy the full SHA
    7a42654 View commit details
  6. Return removed nodes in BST.

    trekhleb committed May 31, 2018
    Copy the full SHA
    f04626b View commit details
  7. Add new hash table methods.

    trekhleb committed May 31, 2018
    Copy the full SHA
    ecd8d22 View commit details
  8. Update hash table methods.

    trekhleb committed May 31, 2018
    Copy the full SHA
    5b3de38 View commit details
  9. Use HashTable in TrieNode.

    trekhleb committed May 31, 2018
    Copy the full SHA
    e6de25e View commit details

Commits on Jun 1, 2018

  1. Copy the full SHA
    02299b7 View commit details
  2. Copy the full SHA
    4132522 View commit details
  3. Add one more test for BST.

    trekhleb committed Jun 1, 2018
    Copy the full SHA
    48f7ea1 View commit details

Commits on Jun 2, 2018

  1. Add red-black tree.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    19789c6 View commit details
  2. Copy the full SHA
    26d6b78 View commit details
  3. Copy the full SHA
    0edb152 View commit details
  4. Update READMEs.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    3d34a5e View commit details
  5. Copy the full SHA
    e7b78e8 View commit details
  6. Update README.zh-TW.md

    trekhleb authored Jun 2, 2018
    Copy the full SHA
    0b89dce View commit details
  7. Update READMEs.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    56ff37d View commit details
  8. Copy the full SHA
    53cd4fb View commit details
  9. Update READMEs.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    87299a5 View commit details
  10. Fix LinkedList (trekhleb#42)

    m-maksyutin authored and trekhleb committed Jun 2, 2018
    Copy the full SHA
    a63bc67 View commit details
  11. Copy the full SHA
    d267d72 View commit details
  12. Add JSdocs for fibonacci.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    88bd8d7 View commit details
  13. Copy the full SHA
    924066b View commit details
  14. Copy the full SHA
    90b56bc View commit details
  15. Update READMEs.

    trekhleb committed Jun 2, 2018
    Copy the full SHA
    d2b8eab View commit details
Showing 576 changed files with 45,863 additions and 8,225 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"presets": ["env"]
"presets": ["@babel/preset-env"]
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# @see: https://editorconfig.org/
root = true

[*]
@@ -6,3 +7,5 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
quote_type = single
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -11,5 +11,11 @@
"class-methods-use-this": "off",
"arrow-body-style": "off",
"no-loop-func": "off"
},
"ignorePatterns": ["*.md", "*.png", "*.jpeg", "*.jpg"],
"settings": {
"react": {
"version": "18.2.0"
}
}
}
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @see: https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository
github: trekhleb
patreon: trekhleb
35 changes: 35 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm i

- name: Run linting
run: npm run lint

- name: Run tests
run: npm run coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
.idea
coverage
.vscode
.DS_Store
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
# npm run test
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.15.0
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

48 changes: 48 additions & 0 deletions BACKERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Project Backers

> You may support this project via ❤️️ [GitHub](https://github.com/sponsors/trekhleb) or ❤️️ [Patreon](https://www.patreon.com/trekhleb).
## `O(2ⁿ)` Backers

`null`

## `O(n²)` Backers

`null`

## `O(n×log(n))` Backers

`null`

<!--
<table>
<tr>
<td align="center">
<a href="[PROFILE_URL]">
<img
src="[PROFILE_IMG_SRC]"
width="50"
height="50"
/>
</a>
<br />
<a href="[PROFILE_URL]">[PROFILE_NAME]</a>
</td>
</tr>
</table>
-->

<!--
<ul>
<li>
<a href="[PROFILE_URL]">
<img
src="[PROFILE_IMG_SRC]"
width="30"
height="30"
/></a>
&thinsp;
<a href="[PROFILE_URL]">[PROFILE_NAME]</a>
</li>
</ul>
-->
20 changes: 20 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
## Contributing

**General Rules**

- As much as possible, try to follow the existing format of markdown and code.
- Don't forget to run `npm run lint` and `npm test` before submitting pull requests.
- Make sure that **100%** of your code is covered by tests.

**Contributing New Translation**

- Create new `README.xx-XX.md` file with translation alongside with
main `README.md` file where `xx-XX` is [locale and country/region codes](http://www.lingoes.net/en/translator/langcode.htm).
For example `en-US`, `zh-CN`, `zh-TW`, `ko-KR` etc.
- You may also translate all other sub-folders by creating
related `README.xx-XX.md` files in each of them.

**Contributing New Algorithms**

- Make your pull requests to be **specific** and **focused**. Instead of
contributing "several sorting algorithms" all at once contribute them all
one by one separately (i.e. one pull request for "Quick Sort", another one
for "Heap Sort" and so on).
- Provide **README.md** for each of the algorithms **with explanations** of
the algorithm and **with links** to further readings.
- Describe what you do in code using **comments**.
Loading