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.
That one-line split of the encoded string into five parts is exactly what I was looking for but couldn't articulate. Well done.
I did understand the kata correctly. My expression simply needed a very minor correction to properly work with "match" instead of "search". Thank you.
You can match the end if you want to so I don't see how it matters either way.
When you say you pass cases that you don't pass you're probably misunderstanding what's asked for. Sharing this test case and your expected outcome would clarify whether that's the case.
Has this kata been modified? The test suite uses the "match" method on a Python re.compile object, but match only checks for matches at the start of a string. I don't think that is what the kata is asking for.
I used the "search" method, which scans the entire string, and sure enough it is failing only on the randomized cases where the target is embedded in the middle of the string whereas any of these randomized cases pass in the code on my machine.
I had to forfeit! :(
Can the coders with working solutions comment their code so I can figure this out please?
For
n
, reduce that number until you reach a number that can be expressed in the form 2^n where n is a positive integer.Not sure what is meant by "last power of 2". Can we get clarification on that point?
Specifies that PL/SQL must be used, but answer actually fails on valid PL/SQL syntax while the training screen defaults to Postgres. Mention of the people table is also irrelevant.