Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
O(n^2) time because String.sub creates a new string for each element of the input
Changing
Array#include
is not an ideal solution as it may break other code if thrown into a more complex program.This is not an issue, it's a suggestion.
shouldnt the second part of the regex for months w 30 days be 30 rather than 3[0-1] ?
the two functions are pretty repetitive in their solutions. my advice would be to narrow the kata down to one function.
if you look at the characters of 1875, the biggest symmetrical number in it is simply 8 because every character is unique.
since 8 is the biggest character, it is also the biggest palindrome.