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.
brev=wit
brevity is talent's sister
I'm laughing so hard, this is a brilliant solution
This comment is hidden because it contains spoiler information about the solution
Is 4+1=5
and 4-1=3
Your array dont contain 3 or 5
It's false
This is not a general solution!
As a software Engineer I realised, I need to know literature more than before to undestand what your question says :|
[1, 1, 1, 1, 2, 4, 4]
res = true
expected:<true> but was:<false>
:|
Still, this is the less poorly explained kata from this user.
There is no need for two loops :)
Genius
Am I a Coder or Physicist? :|
"i" can not be "0"! because I used IntStream which starts from "1"
IntStream.range(1, arr.length)
your solution would fail if
i==0 and a[i]==0
That was awesome but time complexity!