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.
To avoid code like:
(double) 1 / ((double) n * (double) n);
You can simply write
1./(n*n)
. The dot behind the 1 will turn its type to double, and divison between double and int gives double.laudatory or derogatory?
nerd
I'd recommend storing the size of the initial array to avoid recalculating it every time we drop 1 element.
Thanks! Much appreciated.
Nice kata idea and nice solution you implemented. Cheers
Nearly identical to my own solution, a suggestion for you though, try using move() for the result = temp for better eficiency.
Instead of calling lowercased() on each character, you can call it only once on the string itself, making it more efficient. Cheers!