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.
OP solved it by hard-coding, closing :-)
I think this was quite fun, but it can be frustrating if you know nothing about baking cakes, and like needed to re-read instructions a couple of times and think about what happens if you lack some ingredient totally. xD
funny but good! :D
Used TDD and jest for it. Didn't come up with the math clever answer, but was still happy to have used TDD and jest and learned more about that.
Had some repetition that I could refactor away still...
Looking through translations, Python seems to have fixed tests with zero weight but not zero prices. Haskell seems to lack zero price tests as well in the fixed suite.
Those cases are clearly not robust enough, however, since there are still incorrect solutions that aren't invalidated.
why and how does it influence?
Weights can be zero, because diamonds exist. Prices can also be zero, because bricks exist.
If Python does not have ( fixed ) tests with zero weights and / or zero prices, these can ( and should ) be added.
This comment is hidden because it contains spoiler information about the solution
The difference would be 2 in either case.
does up and down climbs count equal weight of difference
if starting from 9 -> 8 -> 7 differences would be still = 3 between these?
is it the same as going from 7->8->7 differences would still be 3?
pro (or noob) tips for C++
That's because some items can have a weight of 0 (which is nonsensical), and the solution only checks up to 0 (not inclusive). Change
for w in range(n, 0, -1):
tofor w in range(n, -1, -1):
and it will work.Also
n
can be 0 too. This should be fixed or at least mentioned in the description.The table name you should use is
people
, you only need to return a single column,age_sum
. That is already in the kata's description, read it again. If you have to sum them all, then the result is a single row.+1
In particular, since this is supposed to be a beginner kata.
So far, I haven't solved this kata, as the instructions need much more clarification.
What is the table name? Which columns are expected to be returned, or just one row?
This comment is hidden because it contains spoiler information about the solution
Loading more items...