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.
OP solved it, closing
This comment is hidden because it contains spoiler information about the solution
In operators:
if (a[i] != b[j]) {
difference.add(a[i]);
You output element a[i] as many times as it does not match the elements b. And it must be equal to 1 time, and then only if it does not coincide with any of the elements b.
When your result looks like the expected one, but still fails, it is helpful to print your string between delimiters and escape whitespace characters.
For your situation:
for
n = 1
, this prints:"*\n \n"
while the expected answer is:
"*\n"
This comment is hidden because it contains spoiler information about the solution
i solved it
test case a = [3, 4, 5] b= [1, 2, 3, 4]
This comment is hidden because it contains spoiler information about the solution