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.
While the current tests are comprehensive, the following could add even more robustness:
Empty String:
Test splitting an empty string: split("", ' ').
Expected result (strip = false): {""}.
Expected result (strip = true): {}.
Single Character Input:
split("a", ' ') should return {"a"}.
split("-", '-') should return {"", ""} for strip = false and {} for strip = true.
Buffer Size:
Verify behavior with long tokens exceeding BUFFER_SIZE to ensure correct truncation.
Example: split(std::string(70, 'a') + ",b", ',', false).
Non-Printable Delimiters:
Test with special characters like \t (tab) or \n (newline).
Sorry but IMHO using namespace std; is a
Yes I know ! Just forked... the kumite
Absolutely not :-)
should I include "#include <fmt/format.h>" to the kata
THANKS FOR YOUR kUMITE SOLUTION BUT THIS KUMITE IS ALREADY AVAILABLE AS A KATA
just add
"using namespace std;"
after include statements
sure
maybe 6 or something
I have created this as a kata and I want you to review it.
https://www.codewars.com/kata/reviews/66bf56746cc0a210696a4149/groups/66bf56746cc0a210696a414b
Can you reiew the pull request on github. To push the liscence and ReadMe.md.
The code works thanks. I was hopping how to approve this kumite to a kata. how should I rank it.
Hi oantby,
Thank you for responding. You're right this kata/kumite looks odd but i am trying to find a way to make this kata a bit tricky even for me I started this kata/kumite so as the test case make random 4 - digits numbers(totaly different for each and every try) so this kata/kumite is solved by making a code that can guess the 4 - digit numbers generated in the test case so as it loops untils maximum 20 tries in those tries if the code output the same number it accepts it, if it just don't work(gives error) or takes more than 20 tries to solve(cuases runtime error). But at the bright side I took your advice and made some minor change to it which was my problem. And the game works but still I wanted to make this kata/kumite with you. You helped me so much. I will give you the code here.
This comment is hidden because it contains spoiler information about the solution
"faster" is true; "more effective" depends on the desired effect. Depending on your stdout, the behavior of the two is different, since
endl
forces a buffer flush.Loading more items...