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.
Perhaps you could add a test case where the array isn't sorted from poorest (left) to richest (right) as my original solution leveraged an incorrect assumption that the full tests would also be as such. Or perhaps just say in the description that input won't necessarily be in this order. I failed my final solution and had to significantly refactor as a result :*(
Other than that I really enjoyed the Kata and 'creative' description! ;)
Thanks!
I'm in the process of writing another kata which builds on this so was hoping to make a series. Although I would agree regarding my difficulty probably being less than that of myjinxin2015's
141, 1221, 1001, 22, 00
"write a function which returns the number of numerical palindromes WITHIN each number. For this kata, single digit numbers will NOT be considered numerical palindromes."
Yes I guess it is the same :/ I hadn't seen it yet. I was just trying to write my first kata and this seemed like an interesting problem I'd heard of in an interview.
Thanks! I still thought it was a great kata :)
I love this solution. Not having a comp sci background and still being a bit of a noob, I have learned so much from figuring out how this algorithm works.
Thanks!
Great, interesting kata. Thanks!
However, I would like to suggest that you amend your description where it says
"One of them asks you to find a bug on a single line of the given code,"
as in the full tests there are cases where bugs were introduced on multiple lines of code in the same challenge.
Additionally you could include in the basic tests one example that tests for these edge cases where multiple "buggy" lines are introduced into the source array.
Not a huge deal as I was still able to pass the the kata fairly quickly but was a little frustrating to not pass first time due to
this additional consideration that wasn't clearly mentioned in the description or the basic test cases.
Thanks!!
You were right. I dealing with situations where there was no match correctly.
Finished this now!
Thanks, and sorry for bothering you with this non-issue
Hello! Quick Question,
Where you have used the code 'result.push(...algo(numbers[i]))';
What is the purpose of the '...'?
Is this a new feature in ES6?
Thanks if anyone is able to help clarify!
https://en.wikipedia.org/wiki/Palindrome
A palidrome is a sequence of letter, numbers, etc that reads the same forwards as it does backwards. Therefore a 1 letter string can be said to be a "palindrome" because it reads the same if all the letters are reversed (in this case just one letter). From this we can deduct that any string will contain, at a minimum, a palindrome with a length of 1.
This comment is hidden because it contains spoiler information about the solution