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: edgarronda/javascript-algorithms
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 Jul 20, 2018

  1. Copy the full SHA
    a3dce16 View commit details
  2. Copy the full SHA
    fc89336 View commit details

Commits on Jul 21, 2018

  1. Copy the full SHA
    3c00a69 View commit details

Commits on Jul 22, 2018

  1. Copy the full SHA
    eec7f2f View commit details
  2. Copy the full SHA
    3be02b5 View commit details
  3. Copy the full SHA
    76c172b View commit details

Commits on Jul 23, 2018

  1. Copy the full SHA
    6a3a4b8 View commit details

Commits on Jul 24, 2018

  1. Copy the full SHA
    76461f2 View commit details
  2. Copy the full SHA
    0361fe5 View commit details
  3. Copy the full SHA
    12f0b33 View commit details
  4. Fix issue trekhleb#105.

    trekhleb committed Jul 24, 2018
    Copy the full SHA
    39014f7 View commit details
  5. Translate to Korean (trekhleb#109)

    * docs: create README.ko_KR.md
    
    Translate to Korean.
    
    * docs: Add korean readme
    yeonjuan authored and trekhleb committed Jul 24, 2018
    Copy the full SHA
    740a6ad View commit details
  6. Add Korean README.

    trekhleb committed Jul 24, 2018
    Copy the full SHA
    7c95d3a View commit details
  7. Add Korean README.

    trekhleb committed Jul 24, 2018
    Copy the full SHA
    cd7fec3 View commit details

Commits on Jul 25, 2018

  1. Rename Korean README.

    trekhleb committed Jul 25, 2018
    Copy the full SHA
    b79fc05 View commit details

Commits on Jul 26, 2018

  1. Update contribution guide.

    trekhleb committed Jul 26, 2018
    Copy the full SHA
    324e761 View commit details
  2. Update contribution guide.

    trekhleb committed Jul 26, 2018
    Copy the full SHA
    8da83cd View commit details
  3. Copy the full SHA
    39acb2b View commit details
  4. Add annotations to Trie.

    trekhleb committed Jul 26, 2018
    Copy the full SHA
    80e3216 View commit details
  5. Translation to Polish (trekhleb#115)

    * Create README.pl-PL.md
    
    Translation to Polish
    
    * Update README.md
    
    adding Polish language to the list
    pavelekpl authored and trekhleb committed Jul 26, 2018
    Copy the full SHA
    577cba9 View commit details
  6. Add Polish translation.

    trekhleb committed Jul 26, 2018
    Copy the full SHA
    f8e3965 View commit details
  7. Add Polish translation.

    trekhleb committed Jul 26, 2018
    Copy the full SHA
    d090f76 View commit details

Commits on Jul 27, 2018

  1. Add French translation (trekhleb#116)

    Yonaba authored and trekhleb committed Jul 27, 2018
    Copy the full SHA
    2321c1e View commit details
  2. Add French translation.

    trekhleb committed Jul 27, 2018
    Copy the full SHA
    97c9f6f View commit details
  3. Add rain-terraces (trapping rain water) algorithm (trekhleb#112)

    * Add rain-terraces (trapping rain water) algorithm
    
    * Fixed linting errors
    
    * Fixed linting errors
    ObiWanKeoni authored and trekhleb committed Jul 27, 2018
    Copy the full SHA
    f142ca0 View commit details
  4. Add Rain Terraces problem.

    trekhleb committed Jul 27, 2018
    Copy the full SHA
    3271ee9 View commit details
  5. Add Rain Terraces problem.

    trekhleb committed Jul 27, 2018
    Copy the full SHA
    6fc4299 View commit details
  6. Copy the full SHA
    340a71b View commit details
  7. Copy the full SHA
    f07e96e View commit details
  8. Copy the full SHA
    26239f9 View commit details
  9. Copy the full SHA
    f1152bf View commit details

Commits on Jul 28, 2018

  1. Update README.ko-KR.md (trekhleb#118)

    * docs: create README.ko_KR.md
    
    Translate to Korean.
    
    * docs: Add korean readme
    
    * Update README.ko_KR.md
    
    Update README.ko_KR.md for Trapping Rain Water problem.
    yeonjuan authored and trekhleb committed Jul 28, 2018
    Copy the full SHA
    7d87c8c View commit details

Commits on Jul 29, 2018

  1. Copy the full SHA
    305e303 View commit details
  2. Copy the full SHA
    f32172e View commit details

Commits on Jul 30, 2018

  1. Korean translation fix.

    어떤 종료의 -> 어떤 종류의
    grapgrap authored and trekhleb committed Jul 30, 2018
    Copy the full SHA
    b73aa7f View commit details
  2. Refactor Rabin-Karp (trekhleb#110)

    * Simplify Rabin-Karp functionality
    
    * Created Rabin Fingerprinting module within util directory
    
    * Updated Rabin-Karp search to use rolling hash module
    Incorporate tests from @dubzzz
    Bruce-Feldman authored and trekhleb committed Jul 30, 2018
    Copy the full SHA
    c4605ea View commit details
  3. Minor README updates.

    trekhleb committed Jul 30, 2018
    Copy the full SHA
    6e897a0 View commit details
  4. Twice defined (trekhleb#124)

    * Twice defined
    
    Parameter 'deletedTail' were defined twice.
    
    * Update LinkedList.js
    
    * Update LinkedList.js
    seIncorp authored and trekhleb committed Jul 30, 2018
    Copy the full SHA
    5105898 View commit details
  5. Copy the full SHA
    97926b1 View commit details
  6. Copy the full SHA
    ecc8c65 View commit details

Commits on Aug 2, 2018

  1. Copy the full SHA
    7a4b829 View commit details

Commits on Aug 6, 2018

  1. Patch 5 (trekhleb#127)

    * New function 'fromArray'
    
    Function get array of Doubly Linked List Nodes, go through and append to currently list.
    
    * New Test for new function 'fromArray'
    
    * Minor changes
    
    Minor changes about coding style.
    seIncorp authored and trekhleb committed Aug 6, 2018
    Copy the full SHA
    0ea2423 View commit details
  2. Copy the full SHA
    88bbfdc View commit details
  3. Copy the full SHA
    941feda View commit details
  4. Update combinationSum.js (trekhleb#137)

    fixing a few typos in comments
    thewizarodofoz authored and trekhleb committed Aug 6, 2018
    Copy the full SHA
    7c9601d View commit details
  5. Copy the full SHA
    650e309 View commit details

Commits on Aug 9, 2018

  1. Copy the full SHA
    d303d83 View commit details
  2. Copy the full SHA
    e7d22b4 View commit details
  3. Copy the full SHA
    b3a503a View commit details
  4. Copy the full SHA
    98a44ea View commit details
Showing 476 changed files with 39,045 additions and 9,393 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
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>
-->
21 changes: 20 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +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.
- If you're adding **new** algorithms or data structures please provide **README.md** for each of them **with explanations** of the algorithm and **with links** to further readings.

**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