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 process has been really crappy, and not supportive at all, in which I recieved insults from a user. I doubt my comments will make much of a difference, and I understand that, which is why I doubt I would waste time submitting anything else, unless I had an abstract idea for a "story style" problem. Pretty much anything algorithmic in nature is probably a "duplicate". This is asimilar to the fact you'd never return to a makerspace in which people just called you lazy for forgetting about a small part of a project, and then threw your project in the garbage. It was a good go at learning about generating random tests, though.
Thank you for presenting an actionable issue, and not calling me lazy. I've tweaked the description. :)
It is.
bigArray => [ Number, Number, ... ]
Reading through the description carefully would've netted you seeing that and spared me an insult.So, I was unaware of the alternative definition of "Duplicate" that you suggest. Typically duplicate is an synonym of "identical". This kata requires some additional logic inside a bst algo, which should spur some identity. All of this is somewhat bike shedding - if it's a duplicate, let's kill it, if it's not, let me improve it and use your energy on this conversation to help me do so.
Saying it's not tested adequately is also not helpful or constructive, please tell me why and what I can do to improve that. I did attempt to override the Array indexOf prototype in the suite, but chai or mocha uses it under the hood and it breaks the test. Any ideas?
It was published!
@JohanWiltink The definition of "duplicate" is indeed identical - I didn't know codewars' interpretation of the word. I'm curious as to why you believe it's not tested adequately either and how you would improve on that? I'd like to learn some ways to validate solutions even further than what I've created, rather than just shoot the kata down because it's just a general BST test. When I first wrote the test suite, I did try and override the indexOf prototype, but chai uses it under the hood so it broke the tests. Any ideas?
https://user-images.githubusercontent.com/6146261/62568587-c98c0c00-b84a-11e9-9549-8c8d0a9061a6.png This is my current state of publishing. Validating works, but I cannot publish.
This has also been fixed - my bad!
This has been fixed, thanks!
Function is guaranteed an array length > 1
Please reference a kata?
Not bad not bad
Right. JS math is fairly buggy - in this case the function will round only when given 9 thousandths. I have no guess as to why it even rounds, but it seems to be different per browser.