319 replaced the regex solution for the palindromes exercise with a non-regex solution, which definitely was the right move given the context of the curriculum at that point as well as regular gripes in the community from learners who get hit in the face with a regex brick wall upon seeing the solution. However, this was only reflected in the solutions branch and not in the main branch.
Since then, changes to the main branch's solutions test file have not been reflected in the solutions branch and it seems this branch is no longer in use/being updated; learners are also unlikely to be aware of this branch and will just use the solutions directory from the main branch.
This PR
Replaces the main branch 09_palindromes regex-based solution with the non-regex solution from the solutions branch.
Adapts that solution to the current test suite, which accounts for unevenly spaced numbers which the original did not pass.
Cleaned formatting of comments and improved their wording for clarity.
Issue
N/A
Additional Information
Proof that the new solution passes all current tests in the main branch:
![Palindromes non-regex solution and test results](https://i.ibb.co/tP5ymgy/20240229-185732-screenshot.jpg)
Because
319 replaced the regex solution for the palindromes exercise with a non-regex solution, which definitely was the right move given the context of the curriculum at that point as well as regular gripes in the community from learners who get hit in the face with a regex brick wall upon seeing the solution. However, this was only reflected in the
solutions
branch and not in themain
branch.Since then, changes to the
main
branch's solutions test file have not been reflected in thesolutions
branch and it seems this branch is no longer in use/being updated; learners are also unlikely to be aware of this branch and will just use the solutions directory from themain
branch.This PR
main
branch09_palindromes
regex-based solution with the non-regex solution from thesolutions
branch.Issue
N/A
Additional Information
Proof that the new solution passes all current tests in the main branch:
![Palindromes non-regex solution and test results](https://i.ibb.co/tP5ymgy/20240229-185732-screenshot.jpg)Pull Request Requirements
location of change: brief description of change
format, e.g.01_helloWorld: Update test cases
Because
section summarizes the reason for this PRThis PR
section has a bullet point list describing the changes in this PRIssue
section/solutions
folder