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.
With s = "lpllmdokuhqokgkmwyrfuzzcjgozlkqiqmhgdmvopiqkdlppqxjwyiyvhbchfvvsr": 3 should equal 5
Can anyone help me to find 5?
This comment is hidden because it contains spoiler information about the solution
test.assert_equals(slogans("glorytoukraine","ukraineaineaine"),3)
test.assert_equals(slogans("glorytoukraine","ukraineaineainee"),4)
second test is "ukraine" + "e" + "e" + "e"?
This comment is hidden because it contains spoiler information about the solution
It turns out that the fruits 'rottenrotten' and 'unroten' should be replaced by '' and 'un'?
Imagine there's a planet with a fruit called 'rotten', 'unrotten', 'rottenbanana' or 'rottenrotten'
Most of the solutions presented will not pass such a test, because the test does not contain examples with 'rotten' without camelcase or containing 'rotten' but not starting with 'rotten'.
Imagine there's a planet with a fruit called 'rotten'. that would break your code.
it's can't pass ['rottenrotten', 'berotten']
"The rotten fruit name will be in this camelcase (rottenFruit)"
это потому, что они забыли включить в тест Pig "latin" is cool...
The task could have been more difficult if the tests had included such an example:
Pig "latin" is cool...
Because they passed all the tests
I think the problem could use at least one more example. and from the above, it seems that the letters should go in a row, but judging from the tests and the discussion, this is not the case.
test.assert_equals(slogans("dhgusdlifons","lifonsssdlifonsgusdlifonssnsdlifonsslifonsifonsdlifonsfonsifons"),13)
please add this example to explain this line 'The glass representation may be larger or smaller. If a liquid doesn't fill a row, it floats to the top and to the left.'
{ {
{ 'H', 'H', 'W', 'O' }, { 'O','O','O','W' },
{ 'W', 'W', 'W', 'W' }, => { 'W','W','W','W' },
{ 'H', 'H', 'O', 'O' } { 'H','H','H','H' }
} }
it can be understood as
{ {
{ 'H', 'H', 'W', 'O' }, { 'O','O','O', '' },
{ 'W', '', '', '' },
{ 'W', 'W', 'W', 'W' }, => { 'W','W','W','W' },
{ 'H', 'H', 'O', 'O' } { 'H','H','H','H' }
} }
or
{ {
{ 'H', 'H', 'W', 'O' }, { 'W','O','O','O' },
{ 'W', 'W', 'W', 'W' }, => { 'W','W','W','W' },
{ 'H', 'H', 'O', 'O' } { 'H','H','H','H' }
} }
Should be able to handle one row
!: [['O'], ['A'], ['W'], ['H']] should equal [['O', 'A', 'W', 'H']]
Completed in 0.03ms
Python