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: ocnly/javascript-algorithms
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ocnly-palindrome
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
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Sep 24, 2018

  1. Fix Stack pop comlexity to be O(1) (trekhleb#214)

    * By definition Stack push/pop time complexity should be O(1).
    * Fix is applied by removing head instead of tail in pop method.
    * Push method now do preprend instead of append.
    * Fix consistency between toString and toArray methods.
    Yavorski authored and trekhleb committed Sep 24, 2018
    Copy the full SHA
    9f3561d View commit details
  2. Copy the full SHA
    ada4537 View commit details
  3. Add remove method (trekhleb#33)

    Remove node in AvlTree with auto balancing.
    
    Fix issue: trekhleb#13
    Bladefidz authored and trekhleb committed Sep 24, 2018
    Copy the full SHA
    04e533e View commit details
  4. Copy the full SHA
    afa4948 View commit details

Commits on Oct 1, 2018

  1. Copy the full SHA
    80211e0 View commit details

Commits on Oct 8, 2018

  1. Mutiple fixes in the spanish readme (trekhleb#221)

    * Fixing various spelling and vocabulary issues in the spanish readme
    
    * Removing some unnecessary capital letters in spanish readme
    
    * Fixing vocabulary in the tables in the spanish readme
    jpvg10 authored and trekhleb committed Oct 8, 2018
    Copy the full SHA
    2be1c44 View commit details

Commits on Oct 9, 2018

  1. Copy the full SHA
    8880752 View commit details

Commits on Oct 12, 2018

  1. Copy the full SHA
    26b8407 View commit details

Commits on Oct 17, 2018

  1. Add prepend and fix bug (trekhleb#227)

    Add prepend operation and fix some mistake in pseudocode.
    kiinlam authored and trekhleb committed Oct 17, 2018
    Copy the full SHA
    044441e View commit details
  2. BubbleSort: use Destructuring assignment to swap values (trekhleb#226)

    * BubbleSort: use Destructuring assignment to swap values
    
    * lint: add semi
    SidKwok authored and trekhleb committed Oct 17, 2018
    Copy the full SHA
    5d12638 View commit details
  3. Properly detect min and max element in array (trekhleb#224)

    Yavorski authored and trekhleb committed Oct 17, 2018
    Copy the full SHA
    6bd6072 View commit details

Commits on Oct 18, 2018

  1. fix typo error (trekhleb#228)

    catchme authored and trekhleb committed Oct 18, 2018
    Copy the full SHA
    fad170c View commit details

Commits on Oct 23, 2018

  1. Copy the full SHA
    fac2d1f View commit details

Commits on Nov 10, 2018

  1. Upgrade packages.

    trekhleb committed Nov 10, 2018
    Copy the full SHA
    af9de0f View commit details
  2. Copy the full SHA
    5e0e571 View commit details

Commits on Nov 14, 2018

  1. Copy the full SHA
    9bc2800 View commit details

Commits on Nov 26, 2018

  1. Copy the full SHA
    f7ebddc View commit details

Commits on Nov 30, 2018

  1. Add comparator annotations.

    trekhleb committed Nov 30, 2018
    Copy the full SHA
    1ecb5b4 View commit details
  2. Copy the full SHA
    5ecb695 View commit details
  3. Do npm audit.

    trekhleb committed Nov 30, 2018
    Copy the full SHA
    039555f View commit details

Commits on Dec 4, 2018

  1. Copy the full SHA
    243be8f View commit details

Commits on Dec 5, 2018

  1. Copy the full SHA
    2382225 View commit details

Commits on Dec 9, 2018

  1. update on readme (trekhleb#235)

    I make sure readers get the full understanding of the documentation
    SlyCreator authored and trekhleb committed Dec 9, 2018
    Copy the full SHA
    d91edc9 View commit details
  2. Copy the full SHA
    6be276f View commit details
  3. Copy the full SHA
    23947bd View commit details
  4. Fix zh-CN README.

    trekhleb committed Dec 9, 2018
    Copy the full SHA
    ab51eb5 View commit details
  5. Copy the full SHA
    4e27a97 View commit details
  6. Copy the full SHA
    c18d119 View commit details
  7. Copy the full SHA
    afa3346 View commit details

Commits on Dec 10, 2018

  1. Copy the full SHA
    8473562 View commit details
  2. [REFACTOR] Algorithms by Paradigm of ReadMe.ko-KR.md (trekhleb#260)

    * [REFACTOR] ReadMe.ko-KR.md
    edit awkward grammar and add more explain about Algorithms by Paradigm
    
    * [ADD] ReadMe of japanese
    Minki-Kim95 authored and trekhleb committed Dec 10, 2018
    Copy the full SHA
    968335c View commit details
  3. Add Japanese translation.

    trekhleb committed Dec 10, 2018
    Copy the full SHA
    d885fd2 View commit details

Commits on Dec 11, 2018

  1. [FIX] Japanese Translation (trekhleb#266)

    * [REFACTOR] ReadMe.ko-KR.md
    edit awkward grammar and add more explain about Algorithms by Paradigm
    
    * [ADD] ReadMe of japanese
    
    * [FIX] change Japan person to langauge of Japan
    Minki-Kim95 authored and trekhleb committed Dec 11, 2018
    Copy the full SHA
    e4ba378 View commit details
  2. Copy the full SHA
    3844e9f View commit details
  3. Copy the full SHA
    3baf88c View commit details
  4. Copy the full SHA
    da0f97a View commit details
  5. Fix btPowerSet() comments.

    trekhleb committed Dec 11, 2018
    Copy the full SHA
    d9946c1 View commit details

Commits on Dec 14, 2018

  1. Copy the full SHA
    59c6f4d View commit details

Commits on Dec 28, 2018

  1. fix wrong words (trekhleb#273)

    LiuL0703 authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    98eb9ae View commit details
  2. Translate into Russian (trekhleb#275)

    * Translate LinkedList README in Russian.
    
    * Translate missed sentence. Add link to Chinese README.
    Stulov Alex authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    90d8a3f View commit details
  3. Fix LinkedList translations.

    trekhleb committed Dec 28, 2018
    Copy the full SHA
    db6fcb2 View commit details
  4. Translate DoublyLinkedList. (trekhleb#276)

    Stulov Alex authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    f53eb17 View commit details
  5. Translate stack into Russian. (trekhleb#277)

    Stulov Alex authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    d67db50 View commit details
  6. Translate Queue into Russian. (trekhleb#278)

    Stulov Alex authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    9e7ef36 View commit details
  7. Translate Priority Queue. (trekhleb#279)

    Stulov Alex authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    2bf2cd9 View commit details
  8. Create README.zh-CN.md (trekhleb#267)

    RequireSun authored and trekhleb committed Dec 28, 2018
    Copy the full SHA
    af77d1a View commit details
  9. Copy the full SHA
    3064a79 View commit details

Commits on Jan 4, 2019

  1. Copy the full SHA
    6261d0e View commit details
  2. Copy the full SHA
    f08fc37 View commit details

Commits on Feb 1, 2019

  1. Copy the full SHA
    6fe7df3 View commit details
Showing 394 changed files with 32,684 additions and 9,138 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
13 changes: 0 additions & 13 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>
-->
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
**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.
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.
Loading