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.
looks like someone didn't even read the specs...
Assume that n is always exchangeable with [100, 50, 20] bills
This code can't handle numbers like 231,232,237.....
Since Array would start with 0, I guess to make sure the last item in marked[] will corresponed to the largest num (in abs) in the lst[]? This way if that num itself is a prime number, say 101, this prime factor, i.e. itself, will also be included in the calculation.
Why does the length of the marked array have to be m+1?
If you are interesting about the formula you can check this.
https://en.wikipedia.org/wiki/Arithmetic_progressionSo this is a generalized version of this? https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF
I assume the (n+1) factor signifies what you're saying is (firstNum + lastNum)
Hint:
1+2+3+...+10 = ( lastOfNum + firstOfNum )* howManyNum /2 = (10+1)*(10-1+1)/2 = 55
Can you explain how your algorithm for expect works?