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.
That's a solid point. It seems like a lot of folks lean towards concise, single-line code for brevity, which is often 'better seen' on platforms like these. But then, when you actually need to debug that code, you're pretty much forced to expand it into multiple lines just to make it traceable. Personally, I find myself constantly pushed into writing everything on a single line just to rack up reputation points on sites like this
goat
The line
const arr = array
does not create a copy of the array, it simply points to it, so both variables refer to the same thing. I tried creating an actual copy and then your code passed.This comment is hidden because it contains spoiler information about the solution
done
Direct duplicate of https://www.codewars.com/kata/5469e0798a3502f4a90005c9/
Check out the hint from MDN web docs. You will solve it!!
Needs fixed tests with a falsy value as the first element, which is the minimum or maximum.
That would trip up some lazy, buggy solutions like the current top voted one.
( JS )
Needs update to
Node 18.x
. Also needs tests with empty array.( Python )
Needs new framework for tests. Needs tests with empty array. ( Also needs random tests, as raised here. )
fixed
Haskell now has random tests.
approved. man, that was necessary!
i love how all of us have the same solution except the variety is on characters
(not like there was any other way to solve this god forsaken puzzle)
Loading more items...