Skip to content

Fix spellings #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 63 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
cba1c31
chore: remove codespell from ci
raklaptudirm Oct 28, 2021
662590b
feat: add codespell workflow
raklaptudirm Oct 28, 2021
64f924f
fix: codespell workflow
raklaptudirm Oct 28, 2021
8adea39
fix: ignore spellings in directory
raklaptudirm Oct 28, 2021
6f61a3a
chore: fix spellings
raklaptudirm Oct 28, 2021
285fcf0
chore: fix spelling
raklaptudirm Oct 28, 2021
bd9c144
chore: fix spellings
raklaptudirm Oct 28, 2021
5aa5091
chore: fix spelling
raklaptudirm Oct 28, 2021
f03712e
chore: fix spelling
raklaptudirm Oct 28, 2021
2c4d6a2
chore: fix spelling
raklaptudirm Oct 28, 2021
1896843
chore: fix spelling
raklaptudirm Oct 28, 2021
c6b8b6a
chore: fix spelling
raklaptudirm Oct 28, 2021
c5f644b
chore: ignore `PermutateString.test.js`
raklaptudirm Oct 28, 2021
56084c1
chore: fix spelling
raklaptudirm Oct 28, 2021
c7a3bbe
chore: ignore `SubsequenceRecursive.js`
raklaptudirm Oct 28, 2021
56c96f2
chore: fix spelling
raklaptudirm Oct 28, 2021
c5a57e8
chore: fix spelling
raklaptudirm Oct 28, 2021
b0b1c5e
chore: remove Linear Algebra
raklaptudirm Oct 28, 2021
290b2ef
Auto-update DIRECTORY.md
Oct 28, 2021
30abe1a
chore: fix spelling
raklaptudirm Oct 28, 2021
f8e6219
chore: fix spellings
raklaptudirm Oct 28, 2021
7722870
merge: Created composite Simpson's integration method. Tests included…
ggkogkou Oct 28, 2021
b1f9747
chore: fix spelling
raklaptudirm Oct 28, 2021
ab00297
chore: fix spelling
raklaptudirm Oct 28, 2021
7324004
chore: fix spelling
raklaptudirm Oct 28, 2021
cdb26bf
chore: fix spelling
raklaptudirm Oct 28, 2021
a817108
chore: fix spelling
raklaptudirm Oct 28, 2021
75590d6
chore: remove codespell from ci
raklaptudirm Oct 28, 2021
c2ac3c5
feat: add codespell workflow
raklaptudirm Oct 28, 2021
9d07bdc
fix: codespell workflow
raklaptudirm Oct 28, 2021
e75aefe
fix: ignore spellings in directory
raklaptudirm Oct 28, 2021
bff45e0
chore: fix spellings
raklaptudirm Oct 28, 2021
c026a65
chore: fix spelling
raklaptudirm Oct 28, 2021
9d8782a
chore: fix spellings
raklaptudirm Oct 28, 2021
000551b
chore: fix spelling
raklaptudirm Oct 28, 2021
72cfef0
chore: fix spelling
raklaptudirm Oct 28, 2021
188c8da
chore: fix spelling
raklaptudirm Oct 28, 2021
7d82885
chore: fix spelling
raklaptudirm Oct 28, 2021
75c5374
chore: fix spelling
raklaptudirm Oct 28, 2021
5572b3a
chore: ignore `PermutateString.test.js`
raklaptudirm Oct 28, 2021
997b576
chore: fix spelling
raklaptudirm Oct 28, 2021
48f6570
chore: ignore `SubsequenceRecursive.js`
raklaptudirm Oct 28, 2021
ee8c54a
chore: fix spelling
raklaptudirm Oct 28, 2021
603bfd4
chore: fix spelling
raklaptudirm Oct 28, 2021
af09e2c
chore: remove Linear Algebra
raklaptudirm Oct 28, 2021
ac0d1b8
Auto-update DIRECTORY.md
Oct 28, 2021
05d944a
chore: fix spelling
raklaptudirm Oct 28, 2021
a1157e3
chore: fix spellings
raklaptudirm Oct 28, 2021
0e52688
chore: fix spelling
raklaptudirm Oct 28, 2021
9f3e6bc
chore: fix spelling
raklaptudirm Oct 28, 2021
f699ec3
chore: fix spelling
raklaptudirm Oct 28, 2021
63679bf
chore: fix spelling
raklaptudirm Oct 28, 2021
25d4455
chore: fix spelling
raklaptudirm Oct 28, 2021
869068c
Merge branch 'fix_spellings' of https://github.com/TheAlgorithms/Java…
raklaptudirm Oct 28, 2021
a6c8193
chore: fix spelling
raklaptudirm Oct 28, 2021
3b393ad
chore: fix spelling
raklaptudirm Oct 28, 2021
ce3637a
chore: fix spelling
raklaptudirm Oct 28, 2021
febda87
chore: fix spelling
raklaptudirm Oct 28, 2021
05a052a
chore: fix spelling
raklaptudirm Oct 28, 2021
1fd6a9b
chore: fix spelling
raklaptudirm Oct 28, 2021
2689bea
chore: fix spelling
raklaptudirm Oct 28, 2021
01a77a4
chore: fix spelling
raklaptudirm Oct 28, 2021
28d7d82
chore: no need to check filenames
raklaptudirm Oct 28, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,4 @@ jobs:

- name: 💄 Code style
run: npm run style
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
check_filenames: true

13 changes: 13 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: codespell
on: [push, pull_request]
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: codespell-project/actions-codespell@master
with:
# file types to ignore
skip: "*.json,*.yml,DIRECTORY.md,PermutateString.test.js,SubsequenceRecursive.js"

2 changes: 1 addition & 1 deletion Backtracking/AllCombinationsOfSizeK.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Problem: Given two numbers, n and k, make all unique combinations of k numbers from 1 to n and in sorted order

What is combinations?
- Combinations is selecting items froms a collections without considering order of selection
- Combinations is selecting items from a collections without considering order of selection

Example:
- We have an apple, a banana, and a jackfruit
Expand Down
4 changes: 2 additions & 2 deletions Conversions/RailwayTimeConversion.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
some changes on hours and minutes and if the time in 'PM' it means the only
want some changes in hour value.

Input Formate -> 07:05:45PM
Output Formate -> 19:05:45
Input Format -> 07:05:45PM
Output Format -> 19:05:45

Problem & Explanation Source : https://www.mathsisfun.com/time.html
*/
Expand Down
4 changes: 2 additions & 2 deletions Conversions/TemperatureConversion.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This files has functions to convert different temperature units
// Functions take temperature value as a arguement and returns corresponding converted value
// Functions take temperature value as a argument and returns corresponding converted value

const celsiusToFahrenheit = (celsius) => {
// Wikipedia reference: https://en.wikipedia.org/wiki/Celsius
Expand Down Expand Up @@ -40,7 +40,7 @@ const fahrenheitToRankine = (fahrenheit) => {
const kelvinToCelsius = (kelvin) => {
// Wikipedia reference: https://en.wikipedia.org/wiki/Kelvin
// Wikipedia reference: https://en.wikipedia.org/wiki/Celsius
return Math.round((kelvin) - 273.15)
return Math.round((kelvin) - 273.15)
}

const kelvinToFahrenheit = (kelvin) => {
Expand Down
7 changes: 1 addition & 6 deletions DIRECTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,6 @@
* [SHA1](https://github.com/TheAlgorithms/Javascript/blob/master/Hashes/SHA1.js)
* [SHA256](https://github.com/TheAlgorithms/Javascript/blob/master/Hashes/SHA256.js)

## Linear-Algebra
* src
* [la_lib](https://github.com/TheAlgorithms/Javascript/blob/master/Linear-Algebra/src/la_lib.js)
* test
* [test](https://github.com/TheAlgorithms/Javascript/blob/master/Linear-Algebra/test/test.js)

## Maths
* [Abs](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/Abs.js)
* [AliquotSum](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/AliquotSum.js)
Expand Down Expand Up @@ -197,6 +191,7 @@
* [ReverseNumber](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/ReverseNumber.js)
* [ReversePolishNotation](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/ReversePolishNotation.js)
* [SieveOfEratosthenes](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/SieveOfEratosthenes.js)
* [SimpsonIntegration](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/SimpsonIntegration.js)
* [Softmax](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/Softmax.js)
* [SquareRoot](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/SquareRoot.js)
* [SumOfDigits](https://github.com/TheAlgorithms/Javascript/blob/master/Maths/SumOfDigits.js)
Expand Down
2 changes: 1 addition & 1 deletion Data-Structures/Array/NumberOfLocalMaximumPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* [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
*
* Notes:
* - like the other similar local maxima search function find relative maxima points in array but doesnt stop at one but returns total point count
* - 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
* - runs on array A of size n and returns the local maxima count using divide and conquer methodology
*
* @complexity: O(n) (on average )
Expand Down
8 changes: 4 additions & 4 deletions Data-Structures/Array/test/LocalMaximomPoint.test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { LocalMaximomPoint } from '../LocalMaximomPoint'

describe('LocalMaximomPoint tests', () => {
it('test boundry maximom points - last element', () => {
describe('LocalMaximumPoint tests', () => {
it('test boundary maximum points - last element', () => {
const Array = [1, 2, 3, 4, 5, 6, 12]
expect(LocalMaximomPoint(Array)).toEqual(6)
})

it('test boundry maximom points - first element', () => {
it('test boundary maximum points - first element', () => {
const Array2 = [13, 6, 5, 4, 3, 2, 1]
expect(LocalMaximomPoint(Array2)).toEqual(0)
})

it('test boundry maximom points - should find first maximom point from the top', () => {
it('test boundary maximum points - should find first maximom point from the top', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [13, 2, 3, 4, 5, 6, 12]
expect(LocalMaximomPoint(Array)).toEqual(6)
Expand Down
14 changes: 7 additions & 7 deletions Data-Structures/Array/test/NumberOfLocalMaximumPoints.test.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
import { NumberOfLocalMaximumPoints } from '../NumberOfLocalMaximumPoints'

describe('LocalMaximomPoint tests', () => {
it('test boundry maximom points - last element', () => {
it('test boundary maximum points - last element', () => {
const Array = [1, 2, 3, 4, 5, 6, 12]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(1)
})

it('test boundry maximom points - first element', () => {
it('test boundary maximum points - first element', () => {
const Array = [13, 6, 5, 4, 3, 2, 1]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(1)
})

it('test boundry maximom points - both boundries have maximum points', () => {
it('test boundary maximum points - both boundaries have maximum points', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [13, 2, 3, 4, 5, 6, 12]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(2)
})

it('multiple maximom points in the middle', () => {
it('multiple maximum points in the middle', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(3)
})

it('multiple maximom points in the middle with one at end', () => {
it('multiple maximum points in the middle with one at end', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [1, 3, 2, 5, 6, 9, 2, 7, 12, 1, 10]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(4)
})

it('multiple maximom points in the middle with one at start', () => {
it('multiple maximum points in the middle with one at start', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [10, 3, 2, 5, 6, 9, 2, 7, 12, 1, 0]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(3)
})

it('multiple maximom points in the middle with two more at both ends', () => {
it('multiple maximum points in the middle with two more at both ends', () => {
// Test a mix of number types (i.e., positive/negative, numbers with decimals, fractions)
const Array = [10, 3, 11, 5, 6, 9, 2, 7, 12, 1, 10]
expect(NumberOfLocalMaximumPoints(Array)).toEqual(5)
Expand Down
2 changes: 1 addition & 1 deletion Data-Structures/Heap/MinPriorityQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MinPriorityQueue {
output(this.heap.slice(1))
}

// heap reverse can be done by performing swaping the first
// heap reverse can be done by performing swapping the first
// element with the last, removing the last element to
// new array and calling sink function.
heapReverse () {
Expand Down
4 changes: 2 additions & 2 deletions Dynamic-Programming/KadaneAlgo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Kadane's algorithm is one of the most efficient ways to
* calculate the maximum contiguos subarray sum for a given array.
* calculate the maximum contiguous subarray sum for a given array.
* Below is the implementation of kadanes's algorithm along with
* some sample test cases.
* There might be a special case in this problem if al the elements
Expand All @@ -11,7 +11,7 @@

export function kadaneAlgo (array) {
let cummulativeSum = 0
let maxSum = Number.NEGATIVE_INFINITY // maxSum has the least posible value
let maxSum = Number.NEGATIVE_INFINITY // maxSum has the least possible value
for (let i = 0; i < array.length; i++) {
cummulativeSum = cummulativeSum + array[i]
if (maxSum < cummulativeSum) {
Expand Down
2 changes: 1 addition & 1 deletion Dynamic-Programming/MaxNonAdjacentSum.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function maximumNonAdjacentSum (nums) {
return Math.max(maxExcluding, maxIncluding)
}

// Exmaple
// Example

// maximumNonAdjacentSum([1, 2, 3]))
// maximumNonAdjacentSum([1, 5, 3, 7, 2, 2, 6]))
Expand Down
2 changes: 1 addition & 1 deletion Dynamic-Programming/SieveOfEratosthenes.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function sieveOfEratosthenes (n) {
/*
* Calculates prime numbers till a number n
* :param n: Number upto which to calculate primes
* :param n: Number up to which to calculate primes
* :return: A boolean list containing only primes
*/
const primes = new Array(n + 1)
Expand Down
2 changes: 1 addition & 1 deletion Hashes/SHA1.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function pad (str, bits) {
* @return {array} - array of original string split into chunks
*
* @example
* chunkify("this is a test", 2); // ["th", "is", " i", "s ", "a ", "te", "st"]
* chunkify("this is a test", 2)
*/
function chunkify (str, size) {
const chunks = []
Expand Down
4 changes: 2 additions & 2 deletions Hashes/SHA256.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function pad (str, bits) {
* @return {array} - array of original string split into chunks
*
* @example
* chunkify("this is a test", 2); // ["th", "is", " i", "s ", "a ", "te", "st"]
* chunkify("this is a test", 2)
*/
function chunkify (str, size) {
const chunks = []
Expand Down Expand Up @@ -76,7 +76,7 @@ function rotateRight (bits, turns) {
* @return {string} - processed message
*/
function preProcess (message) {
// covert message to binary representation padded to
// convert message to binary representation padded to
// 8 bits, and add 1
let m = message.split('')
.map(e => e.charCodeAt(0))
Expand Down
114 changes: 0 additions & 114 deletions Linear-Algebra/README.md

This file was deleted.

Loading