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 solution works. But I think shouldn't be considered as best practices or clever solution since can be optimized
It was not eazy, but very interesting!
This comment is hidden because it contains spoiler information about the solution
JavaScript - can anyone please explain the final test? The instructions say that an empty array should be returned if N is NaN or < 1.
What value is N on the last test? I have tried logging it out and I am only getting 0 or 2 which makes no sense.
emmm... i feel like a fool.
Look at begining of your function. Empty array is
{}
{{}}
- array containing 1 empty array.;)
Thank you so much for this comment! I was utterly confused when:
I would've never been able to guess a non-integer was the problem based on the information made available to me by the test. Bad form.
setup should specify whether frog can jump out of either side of the array or not.
invalid input I got was:
-1
0
-101
I think the task condition is written incorrectly. "A frog cannot jump out of an array" how to understand how many jumps it should do to understand that it still cannot jump out of an array??!!! my stack was overloaded because the frog could jump back and forth endless for given condition [1,-1]
approved
approved
C translation 🐸 (author gone)
approved
what kind of invalid input in C++?
i always got UB when testing with your invalid input...
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==1==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000042c63d bp 0x000000000000 sp 0x7ffdb21ad290 T1)
==1==The signal is caused by a READ memory access.
==1==Hint: address points to the zero page.
==1==WARNING: invalid path to external symbolizer!
==1==WARNING: Failed to use and restart external symbolizer!
Loading more items...