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
why do you remove 1 and 3? There's no constarint specified in the instructions list! Am I missing something here?
Even in your example, you have included 3.
If you remove
1
and3
from the vector then Minimum element will be5
.5
>√21
. Hence Expected :2
.If vector is empty, exactly
0
elements will be smaller than1
( or any larger value. but we need the smallest possible positive value ).So if
k == 0
, the expected value would be1
. Ifk /= 0
, no value will work, so expected would be-1
.It has the same logic as
0! == 1
,[].some( anything ) == false
and[].every( anything ) == true
.No supplemental packages are installed, only the C++14 standard libraries.
Most probably runtime error.
same.