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.
as i64
is error-prone foru64
. Consider to usei64::try_from
alternative.consider to replace unconditional
n as i64;
byi64::try_from(n).unwrap();
.See
Possibly to save an import.
I'm not able to see the test cases either, but I guess it could be the case of "a plateau at the end of the array" other comments are talking about, for example:
[1,2,3,1,2,2,2]
shoule returnPickedPeaks {pos = [2], peaks = [3]}
.my haskell code doesn't pass a test
Unfortunately the test input doesn't appear and I couldn't reproduce it. Actually neither of the edges of the input array could appear in output of my implementation because they will be removed explicitly.
Does anyone have a hint with regard to the test input?
Is there a particular reason you are using
read . return
indigits
?Why not digitToInt