| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7722870 commit 072523d
34 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,11 +20,4 @@ jobs: | |||
| 20 | 20 | ||
| 21 | 21 | - name: 💄 Code style | |
| 22 | 22 | run: npm run style | |
| 23 | - codespell: | ||
| 24 | - name: Check for spelling errors | ||
| 25 | - runs-on: ubuntu-latest | ||
| 26 | - steps: | ||
| 27 | - - uses: actions/checkout@v2 | ||
| 28 | - - uses: codespell-project/actions-codespell@master | ||
| 29 | - with: | ||
| 30 | - check_filenames: true | ||
| 23 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,13 @@ | |||
| 1 | + name: codespell | ||
| 2 | + on: [push, pull_request] | ||
| 3 | + jobs: | ||
| 4 | + codespell: | ||
| 5 | + name: Check for spelling errors | ||
| 6 | + runs-on: ubuntu-latest | ||
| 7 | + steps: | ||
| 8 | + - uses: actions/checkout@v2 | ||
| 9 | + - uses: codespell-project/actions-codespell@master | ||
| 10 | + with: | ||
| 11 | + # file types to ignore | ||
| 12 | + skip: "*.json,*.yml,DIRECTORY.md,PermutateString.test.js,SubsequenceRecursive.js" | ||
| 13 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | Problem: Given two numbers, n and k, make all unique combinations of k numbers from 1 to n and in sorted order | |
| 3 | 3 | ||
| 4 | 4 | What is combinations? | |
| 5 | - - Combinations is selecting items froms a collections without considering order of selection | ||
| 5 | + - Combinations is selecting items from a collections without considering order of selection | ||
| 6 | 6 | ||
| 7 | 7 | Example: | |
| 8 | 8 | - We have an apple, a banana, and a jackfruit | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,8 +4,8 @@ | |||
| 4 | 4 | some changes on hours and minutes and if the time in 'PM' it means the only | |
| 5 | 5 | want some changes in hour value. | |
| 6 | 6 | ||
| 7 | - Input Formate -> 07:05:45PM | ||
| 8 | - Output Formate -> 19:05:45 | ||
| 7 | + Input Format -> 07:05:45PM | ||
| 8 | + Output Format -> 19:05:45 | ||
| 9 | 9 | ||
| 10 | 10 | Problem & Explanation Source : https://www.mathsisfun.com/time.html | |
| 11 | 11 | */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | // This files has functions to convert different temperature units | |
| 2 | - // Functions take temperature value as a arguement and returns corresponding converted value | ||
| 2 | + // Functions take temperature value as a argument and returns corresponding converted value | ||
| 3 | 3 | ||
| 4 | 4 | const celsiusToFahrenheit = (celsius) => { | |
| 5 | 5 | // Wikipedia reference: https://en.wikipedia.org/wiki/Celsius | |
@@ -40,7 +40,7 @@ const fahrenheitToRankine = (fahrenheit) => { | |||
| 40 | 40 | const kelvinToCelsius = (kelvin) => { | |
| 41 | 41 | // Wikipedia reference: https://en.wikipedia.org/wiki/Kelvin | |
| 42 | 42 | // Wikipedia reference: https://en.wikipedia.org/wiki/Celsius | |
| 43 | - return Math.round((kelvin) - 273.15) | ||
| 43 | + return Math.round((kelvin) - 273.15) | ||
| 44 | 44 | } | |
| 45 | 45 | ||
| 46 | 46 | const kelvinToFahrenheit = (kelvin) => { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,12 +135,6 @@ | |||
| 135 | 135 | * [SHA1](https://github.com/TheAlgorithms/Javascript/blob/master/Hashes/SHA1.js) | |
| 136 | 136 | * [SHA256](https://github.com/TheAlgorithms/Javascript/blob/master/Hashes/SHA256.js) | |
| 137 | 137 | ||
| 138 | - ## Linear-Algebra | ||
| 139 | - * src | ||
| 140 | - * [la_lib](https://github.com/TheAlgorithms/Javascript/blob/master/Linear-Algebra/src/la_lib.js) | ||
| 141 | - * test | ||
| 142 | - * [test](https://github.com/TheAlgorithms/Javascript/blob/master/Linear-Algebra/test/test.js) | ||
| 143 | - | ||
| 144 | 138 | ## Maths | |
| 145 | 139 | * [Abs](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/Abs.js) | |
| 146 | 140 | * [AliquotSum](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/AliquotSum.js) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | * [NumberOfLocalMaximumPoints](https://www.geeksforgeeks.org/find-indices-of-all-local-maxima-and-local-minima-in-an-array/) is an algorithm to find relative bigger numbers compared to their neighbors | |
| 3 | 3 | * | |
| 4 | 4 | * Notes: | |
| 5 | - * - like the other similar local maxima search function find relative maxima points in array but doesnt stop at one but returns total point count | ||
| 5 | + * - like the other similar local maxima search function find relative maxima points in array but doesn't stop at one but returns total point count | ||
| 6 | 6 | * - runs on array A of size n and returns the local maxima count using divide and conquer methodology | |
| 7 | 7 | * | |
| 8 | 8 | * @complexity: O(n) (on average ) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,17 @@ | |||
| 1 | 1 | import { LocalMaximomPoint } from '../LocalMaximomPoint' | |
| 2 | 2 | ||
| 3 | - describe('LocalMaximomPoint tests', () => { | ||
| 4 | - it('test boundry maximom points - last element', () => { | ||
| 3 | + describe('LocalMaximumPoint tests', () => { | ||
| 4 | + it('test boundary maximum points - last element', () => { | ||
| 5 | 5 | const Array = [1, 2, 3, 4, 5, 6, 12] | |
| 6 | 6 | expect(LocalMaximomPoint(Array)).toEqual(6) | |
| 7 | 7 | }) | |
| 8 | 8 | ||
| 9 | - it('test boundry maximom points - first element', () => { | ||
| 9 | + it('test boundary maximum points - first element', () => { | ||
| 10 | 10 | const Array2 = [13, 6, 5, 4, 3, 2, 1] | |
| 11 | 11 | expect(LocalMaximomPoint(Array2)).toEqual(0) | |
| 12 | 12 | }) | |
| 13 | 13 | ||
| 14 | - it('test boundry maximom points - should find first maximom point from the top', () => { | ||
| 14 | + it('test boundary maximum points - should find first maximom point from the top', () => { | ||
| 15 | 15 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 16 | 16 | const Array = [13, 2, 3, 4, 5, 6, 12] | |
| 17 | 17 | expect(LocalMaximomPoint(Array)).toEqual(6) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,41 +1,41 @@ | |||
| 1 | 1 | import { NumberOfLocalMaximumPoints } from '../NumberOfLocalMaximumPoints' | |
| 2 | 2 | ||
| 3 | 3 | describe('LocalMaximomPoint tests', () => { | |
| 4 | - it('test boundry maximom points - last element', () => { | ||
| 4 | + it('test boundary maximum points - last element', () => { | ||
| 5 | 5 | const Array = [1, 2, 3, 4, 5, 6, 12] | |
| 6 | 6 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(1) | |
| 7 | 7 | }) | |
| 8 | 8 | ||
| 9 | - it('test boundry maximom points - first element', () => { | ||
| 9 | + it('test boundary maximum points - first element', () => { | ||
| 10 | 10 | const Array = [13, 6, 5, 4, 3, 2, 1] | |
| 11 | 11 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(1) | |
| 12 | 12 | }) | |
| 13 | 13 | ||
| 14 | - it('test boundry maximom points - both boundries have maximum points', () => { | ||
| 14 | + it('test boundary maximum points - both boundaries have maximum points', () => { | ||
| 15 | 15 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 16 | 16 | const Array = [13, 2, 3, 4, 5, 6, 12] | |
| 17 | 17 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(2) | |
| 18 | 18 | }) | |
| 19 | 19 | ||
| 20 | - it('multiple maximom points in the middle', () => { | ||
| 20 | + it('multiple maximum points in the middle', () => { | ||
| 21 | 21 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 22 | 22 | const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0] | |
| 23 | 23 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(3) | |
| 24 | 24 | }) | |
| 25 | 25 | ||
| 26 | - it('multiple maximom points in the middle with one at end', () => { | ||
| 26 | + it('multiple maximum points in the middle with one at end', () => { | ||
| 27 | 27 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 28 | 28 | const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 10] | |
| 29 | 29 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(4) | |
| 30 | 30 | }) | |
| 31 | 31 | ||
| 32 | - it('multiple maximom points in the middle with one at start', () => { | ||
| 32 | + it('multiple maximum points in the middle with one at start', () => { | ||
| 33 | 33 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 34 | 34 | const Array = [10, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0] | |
| 35 | 35 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(3) | |
| 36 | 36 | }) | |
| 37 | 37 | ||
| 38 | - it('multiple maximom points in the middle with two more at both ends', () => { | ||
| 38 | + it('multiple maximum points in the middle with two more at both ends', () => { | ||
| 39 | 39 | // Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions) | |
| 40 | 40 | const Array = [10, 3, 11, 5, 6, 9, 2, 7, 12, 1, 10] | |
| 41 | 41 | expect(NumberOfLocalMaximumPoints(Array)).toEqual(5) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -57,7 +57,7 @@ class MinPriorityQueue { | |||
| 57 | 57 | output(this.heap.slice(1)) | |
| 58 | 58 | } | |
| 59 | 59 | ||
| 60 | - // heap reverse can be done by performing swaping the first | ||
| 60 | + // heap reverse can be done by performing swapping the first | ||
| 61 | 61 | // element with the last, removing the last element to | |
| 62 | 62 | // new array and calling sink function. | |
| 63 | 63 | heapReverse () { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments