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.
OMG, I love your solution! You're very patient
lol
Make your own version of BigInt class.
This comment is hidden because it contains spoiler information about the solution
If you look at the example tests, they show you.
not static, called on an object
since that object is a string, you're looking for google.com/search?q=java+String.trim
128 1024 and 4 are some really strange numbers that aren't mentioned in the instructions. those don't belong there!
not sure how you determine that it returns correct answer. try the test cases in the example tests, find out what your code does by printing out information.
The first example test case is
{ 5 8 }
and your code runs for about a minute and then crashes.If you print out the input you can solve it manually and compare to what your code does (by printing out step by step what is happening in your code)
Pick a test where it fails,
(
"The quick brown fox jumps over the lazy dog."
)and use print (System.out.println? I do not java) to write out intermediate steps and thereby figure out where things go wrong.
If it turns out that everything looks fine to you up to that huge boolean expression, then you'll want to break it up into smaller parts.
Some thoughts:
A suggestion:
For each character that you look at, you could print out a verdict, for example
"Found 'A', seen so far: ['A']"
"Encountered ' ', ignoring."
"Encountered already found 'r', ignoring"
Perhaps your approach wouldn't match those messages, but it's still carrying out steps that can be shown in output to allow you to observe what is being done.
Please use spoiler flag if you're sharing details of the solution from next time.