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.
past or present denominators, or defaults
That line, paraphrased / decoded / whatever:
(l+r)/(m+s)
is each new fraction (next iteration), before substitution and simplification. Letl/m
represent whatever the fraction was, just before you most recently parsed anL
choice. Letr/s
represent whatever the fraction was, just before you most recently parsed anR
choice.This is how values of
l, r, m, s
are obtained most often. Butl = 1, r = 0, m = 0, s = 1
are defaults, used when there is no previously parsed L or R (or neither, as shown in the way that the initial1/1
, corresponding to the empty string, is formed entirely out of them).HTH
Same here, I took my notebook and wrote the numbers, the fractions, tried to find a pattern but nothing. I'm not quite following the explanation, this is a problem that most likely would be solved in lets say 10-15 lines maybe, but man I can't even find the logic. If someone can explain it I would appreciate it a lot.
what the hell
This seems like it shouldn't be terribly difficult to implement, but, I can't make any sense of what is actually being asked. I'm trying to follow the "let's take a walk" examples as well, but to no avail.
If there have been no left choices, l = 1. Why isn't it 0 since left has been chosen 0 times so far?
If there have been no right choices, r = 0. Okay maybe that makes sense, as right has been chosen 0 times. But then why is s = 1 instead of 0? Or, why is m = 0 instead of 1? What do m and s even represent?
No the test is correct. You can notice that 5096 guys passed the Java kata.
This comment is hidden because it contains spoiler information about the solution
Since they say that the word "and" may or may not come in between numbers, couldn't you just replace all the "and"s with before digging in?