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.
This comment is hidden because it contains spoiler information about the solution
Thanks for your quick response. I was thrown by the
[A1->B1,A2->B2...]
debug format, which seems a non-standard way of enumerating a continuous array. How about just the usual[B1,B2...]
or JSON-ish[A1:B1, A2:B2...]
? I took your example[0->1]
to mean[old->new]
instead of[index->value]
, but perhaps I should have read the test cases more carefully before starting.As for the output, the reference to (global?)
Output
is obscure, especially when conflating the meaning of "parameter" and "property". And the run-on sentences are unnecessary, distracting, and easily fixed, making it seem like basic proofreading was neglected.The vast majority of work here is simply trying to understand the grossly imprecise description of output behavior.
This is sloppy writing:
Say what you mean: the interpreter instance should have
output
anddebug
properties (not "parameters")!Your only detail regarding
debug
is one example:0->1
, which could be interpreted as an intial zero incrementing to a one. Please verbalize more carefully and add some additional examples.I must object to this:
An exclusive disjunction is typically repsented (sic) by "^" ...
Some specialized contexts (e.g. bitwise operator in some languages) use that symbol, but typically '^' means conjunction and exclusive disjunction (XOR) is represented with another symbol (⊻ or ⊕). This repurposing of '^' is confusing and unnecessary.
I like this a lot, but its tags are deceptive: the real challenge here is getting past the "beast" test, which requires thinking about algorithmic complexity/efficiency, rather than simple string/array fundamentals. I think it deserves a couple of tags in that direction-- perhaps "algorithms"?
Looks better now, thanks for updating.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The line
If y <= 1 then the basic pattern should not be repeated horizontally.
should be
...vertically.
Test #4 at least still isn't correct.
This comment is hidden because it contains spoiler information about the solution
The tests are too generous with some difficult edge cases. For example:
Here /* is //a */ comment
should return
Here comment
but the tests allow solutions which mistakenly strip the //... first and produce
Here /* is
Even more difficult: neither comment form should apply when quoted; i.e.
var x="/*comment*/"
should remain unchanged.
Your test values are completely broken. For example:
Test.assertEquals(profitCheck([[1,-5],[-3,4],[5,6]],600000), "It's a deal!")
That triangle has an area of 40 and revenue of 40000; how can a 600000 license be a deal?
Additionally, the problem says: "you should write a function that returns the area enclosed by these co-ordinates and whether this area will be profitable or not."
The function can't return both.
Finally, the primary effort here is computational geometry, and should be tagged as such.
Probably needs more tests to prevent exploits, unless you intend them as valid strategies.
This comment is hidden because it contains spoiler information about the solution
Loading more items...