fixed some spellings

This commit is contained in:
Keshav Bohra
2021-10-05 12:49:23 +05:30
parent 199d2637cc
commit 1589263947
41 changed files with 80 additions and 80 deletions

View File

@ -10,7 +10,7 @@ function KadaneAlgo (array) {
}
}
return maxSum
// This function returns largest sum contigous sum in a array
// This function returns largest sum contiguous sum in a array
}
function main () {
const myArray = [1, 2, 3, 4, -6]

View File

@ -2,7 +2,7 @@ function sieveOfEratosthenes (n) {
/*
* Calculates prime numbers till a number n
* :param n: Number upto which to calculate primes
* :return: A boolean list contaning only primes
* :return: A boolean list containing only primes
*/
const primes = new Array(n + 1)
primes.fill(true) // set all as true initially

View File

@ -1,19 +1,19 @@
import { longestPalindromeSubsequence } from '../LongestPalindromicSubsequence'
describe('LongestPalindromicSubsequence', () => {
it('expects to return 1 as longest pallindromic subsequence', () => {
it('expects to return 1 as longest palindromic subsequence', () => {
expect(longestPalindromeSubsequence('abcdefgh')).toBe(1)
})
it('expects to return 4 as longest pallindromic subsequence', () => {
it('expects to return 4 as longest palindromic subsequence', () => {
expect(longestPalindromeSubsequence('bbbab')).toBe(4)
})
it('expects to return 2 as longest pallindromic subsequence', () => {
it('expects to return 2 as longest palindromic subsequence', () => {
expect(longestPalindromeSubsequence('cbbd')).toBe(2)
})
it('expects to return 7 as longest pallindromic subsequence', () => {
it('expects to return 7 as longest palindromic subsequence', () => {
expect(longestPalindromeSubsequence('racexyzcxar')).toBe(7)
})
})