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.
Same here - after attempting my first try from yesterday, just to see and analyse why those randos fail, it suddenly works!
OoooK ... ?
Maybe you guys check again - seems the author worked it out ...
ok, this was kind of asking myself "in what way can those weird elements sorted?" Answer: Yes!
Hello, if the "Gotcha" topic I mentioned doesn't trigger you, then it looks like you're not affected by it either.
Otherwise, I have described as briefly as I could what it is about.
For the rant in it i apologize again, but sometimes this must also be said
Just the other day I read here on Codewars from someone who complained about so-called "Gotcha" Katas.
This is one of them.
I am beginning to understand this very well!
Just, why??
Why can't you write in the description the actual, or better, the complete problem?
is this really such an uplifting "hihihihi" moment?
Why not put one of the more complex inputs - at least just ONE - in the test section too, rather than "Gotcha!" at Attempt first.
sry for the rant - have a nice weekend everyone!
definately not a 6kyu - if you compare solutions of this and other 6kyu's ...
I actually thought about it a little bit.
So to eliminate the biggest misunderstandings, it would be easiest, but I don't say best, to throw the stock story around it overboard.
If this story remains, that is definitely what should be adjusted most urgently.
What I specifically suggest immediately in the error message:
The statement "... quotes: expected 19180 to equal 32786"
I must admit, yes, it is not wrong, but unsettles at first, especially because you are used to it differently from other Katas.
Just very simple and you have saved many people a few minutes of thinking about it ^^ :
"... quotes: expected 32786; your result: 19180 "
I was also bothered by it at first, but the truth is that a task is offered here, no matter what the story is around it. Often the background plays a role, but sometimes actually not. And this can be seen as such and is part of the training to recognize it as such. That's how i try to see it. You can also see that the author just tried to package it nicely for us, or I can imagine that banks want to have such programs purely for statistical reasons and not for the development of investment strategies? Would be even logical. Of course, after a week of e.g. share trading and not in advance.
Whereby something like this could be used for setting and calculating stop-loss orders - something like this really exists btw.
took me also way more time to understand that Kata as to code it ...
in the first array, 312 isnt the onliest occurrence of a high number where it rises to an certain maximum before it falls ... in this case, next is 126, then 4 ...
this is more a fantasy kind of playing with numbers, this Broker / profit with stocks background kind of thing is just distracting
good goooood ... ok, was fun actually doing some formating ... first (real) overdone Kata for me lol
Thank you ^^
the example this time in this kata doesnt show what the output should look like? just the freaking number ??? 15 in this case?
the testscript does not declare with strictEqual that it must to be a string, im learning TDD at the moment, so i may be wrong - so far i know it should stated in the testScript then as well?
Hi Johan,
this is all i got:
"Most profit for [1,2,3,4,5,6] quotes: expected '=> 15 (buy at 1, 2, 3, 4, 5 and then sell all at 6)' to equal 15"
Unfortunately no comparsion what my ouput is as usual - but in my console / terminal it is exact the same as mentioned above
ok, i solved it, but the tests fail; in my console in gives the exact same output as the test actually (even with large random ones, correct in my terminal, fail with test here) ... anyone else has this? is it a formating thing?
e.g.
my output:
=> 10130 (buy at 390, 665, 518, 677, 336, 611, 587, 723, 758, 343, 766, 992, 202, 870, 400, 960, 605, 542, 402, 798, 630, 799, 984, 62, 275 and then sell all at 1001)
expected by the test:
=> 10130 (buy at 390, 665, 518, 677, 336, 611, 587, 723, 758, 343, 766, 992, 202, 870, 400, 960, 605, 542, 402, 798, 630, 799, 984, 62, 275 and then sell all at 1001)
Whats the difference?
This comment is hidden because it contains spoiler information about the solution
yeah, i also guess it's the last blank ... arrrrr ... ^^ thank you!
Loading more items...