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.
How so? Integer multiplication and division by two are internally realized using bit shifts:
Which of these is better? (In my own experiments, I found only a negligible speed difference < 1%)
What are we supposed to do here?
I feel like this should be rated higher than a 7.
You have 10 fingers. Does the 10th finger belong to the first 10 fingers? Or it starts the new "ten"?
First of all, there's no year 0. There's year 1 AD, and year 1 BC, but there's no year 0.
Now, century is 100 years. If 100 year period starts at year 1 AD, and it counts 100 years, it means it contains also year 100 AD.
I was somewhat surprised seeing that 'general definition of a century' is even a thing. This would mean, that all centuries have 100 years, except the first century, which would count 99 years. This idea is so... interesting that I start to believe it's only American thing ;)
!TEAM STRICT!
yeah, there's two conceptions. there's the Strict and General conceptions. Both are right, i guess. This kata uses the Strict definition.
This comment is hidden because it contains spoiler information about the solution
ah, i see. 0 would be the first year of the first century. following that logic then, trailing zeros would be still the same century. i don't know though if in common thought that's true. fringe case due to language misconceptions! fringe case... Also what if year 0 is actually considered the last year of BC, and AD starts with year 1?
It's not.
What is the first year of 1st century? And the last one?
What century is year 100 AD?
wouldn't 2000 be the 21st century? wouldn't 1999 be the last year of the 20th century? like any year ending 99 would be the last year for a century, and any year ending in 00 would be the start of a new century, is my understanding.
What's the largest number that will be tested? 3999?
This comment is hidden because it contains spoiler information about the solution
Hmm, I may have it wrong. I need to check my algorithm, my apologies.
No, it's not.
Practical SQL is pretty good if you're still looking
Loading more items...