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.
Thanks. Though on the performance side, it's probably quick because the graph is small. I don't know how it would perform if the graph were a lot bigger.
This comment is hidden because it contains spoiler information about the solution
Nice, same here, I stumbled on the patterns after staring at it for a while. Trying to understand some of the math behind it from the other solutions, but it's mostly over my head.
This comment is hidden because it contains spoiler information about the solution
Love the comments on top!
This comment is hidden because it contains spoiler information about the solution
While coding up my uber long solution, I just knew somebody was going to do it in one line... XD
Good to hear @jdautel! Like @olefinsketones above, I'm also a software developer (been doing it for almost 10 years now), and I like to think I'm decent at my job. 4 kyu are pretty challenging for me, and the only 3 kyu I attempted took me the better part of a day. Pretty impressive that you can solve these doing it purely as a hobby. I think you have the technical potential in this field if you ever change your mind.
@olefinsketones, I'm a bit late to the party, but thanks for this really nice post. Well said.
Agree, requirements are not 100% clear especially when reading some of the comments here. I actually just finished this kata and based on the test results, it's definitely the case that only order of operations is considered, not parentheses. For example:
Assuming
&
has equal or higher precedence than^
, the two expressions above have the same exact order of operations, and so should only be counted once.Much more elegant solution than I could think of...