Commit Graph

5 Commits

Author SHA1 Message Date
MaoShizhong 461c852f98 Use const for palindrome solution variable (#439) 2024-03-03 01:44:34 +00:00
MaoShizhong f215901131 Replace palindromes exercise solution with non-regex version (#438)
Adapted the non-regex solution provided in the solutions branch (which
was not brought over to the main branch's solution file) to pass the
current test suite.
Cleaned formatting of comments and reworded for clarity.
2024-03-02 13:57:16 +00:00
MarLatte e8fc8ce41e Update palindromes to handle numbers better
The previous solution removed numbers entirely, whereas this one treats
them like letters and checks if they are evenly spaced.

More importantly, the old solution test seemed to check if the numbers
were palindromic, but because the solution replaced them with "", it
wasn't testing what it seemed to.

I added a new test to differentiate between the palindromic "rac3e3car"
and the non-palindromic "r3ace3car".

These changes also obviate the problems raised in Issue #355.
2023-05-20 02:47:17 -04:00
thatblindgeye 4a112362c8 Update files 2023-01-21 12:53:41 -05:00
thatblindgeye fb1a2db8d7 Add solution directories for exercises 2022-02-20 14:07:44 -05:00