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.
Something like this:
int[] a = {3, 2147483646};
int[] b = {9, 4};
returns true...
Could you elaborate?
Can you give an example? If any
a[i]*a[i]
overflows, then there can be no matchingb[j]
. I supposeb[j]
could exactly match the overflow value ofa[i]*a[i]
, but that is a little tricky for 6kyu.yes. More than one continuous spaces splited by " " will got the empty string, joined by " " will revert it.
Any prime close to max value of int will cause this solution to timeout.
This solution will not work properly in case of int overflow.
I am disappointed with this website ... it teaches to write inefficient and incorrect code
This solution is too slow anyway (if we are talking about performance) to bother about such minor optimization at all.
Will this solution still work for tests where words are separated by more than one space?