Skip to content

Commit

Permalink
fix test cases for palindrome
Browse files Browse the repository at this point in the history
  • Loading branch information
ragmha committed May 5, 2024
1 parent b8233ed commit 383105e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

| Name | Tags | Solution |
| --------------------------------------------------------- | ----------------------- | ----------------------------------------------------------------------- |
| Is-Monotonic | `Arrays` | [TypeScript](./src/algorithms/arrays/is-monotonic) |
| Is-Monotonic | `Arrays` | [TypeScript](./src/algorithms/arrays/is-monotonic/is-monotonic.ts) , [Python](./src/algorithms/arrays/is-monotonic/is_monotonic.py) |
| 2D Array - DS | `Arrays` | [TypeScript](./src/algorithms/arrays/2d-array-ds) |
| Left Rotation | `Arrays` | [TypeScript](./src/algorithms/arrays/left-rotation) |
| New Year Chaos | `Arrays` | [TypeScript](./src/algorithms/arrays/new-year-chaos) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ describe('Valid Palindrome', () => {
expect(isPalindrome(' ')).toBe(true)
})

it('is a valid palindrome with numbers and letters', () => {
expect(isPalindrome('A man, 1234567654321 a canal: Panama')).toBe(true)
})

it('is not a valid palindrome with special characters', () => {
expect(isPalindrome('Hello! How are you?')).toBe(false)
})

it('is a valid palindrome with special characters and numbers', () => {
expect(isPalindrome('Was it a car or a cat I saw? 12321')).toBe(true)
expect(isPalindrome('Was it a car or a cat I saw')).toBe(true)
})

it('is a valid palindrome with emoji', () => {
Expand Down

0 comments on commit 383105e

Please sign in to comment.