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.
Segfault.
Double think about this part:
Let's assume:
size = 4, temp =3 , i =2
If it's still not clear, add
cout
to the part where you buildres
.This comment is hidden because it contains spoiler information about the solution
Add inside your
if
statement :And it should be clear for you why it doesn't work.
68 warriors have solved it already in C++. The issue is in your solution most probably and not in my kata.
Maybe there is i.e. an additional character not visible in your final string at the end.
I don't know your solution and I am not able to help you with it. Investigate your code again. You can post it here marked as a spoiler. Maybe somebody can investigate it for you.
I get failure codes like this:
Should work for 100 random strings of 1000 length:
Expected: equal to Chp0Ht75AqBK8lDXY5bMkz
Actual: Chp0Ht75AqBK8lDXY5bMkz
Should work for 100 random strings of 10000 length:
Expected: equal to kVhRVLx4Ggtp1PLnPMUY84VDhkKG8oGq27LzjUWLuDjcl3WHySV4uk2s2c8EQKP1Kw2J8z
Actual: kVhRVLx4Ggtp1PLnPMUY84VDhkKG8oGq27LzjUWLuDjcl3WHySV4uk2s2c8EQKP1Kw2J8z
etc.
They are exactly the same, but i get the error anyway.
I passed all tests, but i got an Exit Code: 139, so i can´t submit the code. Does anybody know what this means?
Code is in C++.