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> :|
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!
Loading collection data...
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!