Going once through the array or twice saying one is best than the other is like saying that N*2 is worse/better than 2*N. Both are just the same, about time complexity. And for instance, this solution is more efficient beacuse of python's interpreter when it comes to compare actual perfs.
that doesn't change anything.
Going once through the array or twice saying one is best than the other is like saying that
N*2
is worse/better than2*N
. Both are just the same, about time complexity. And for instance, this solution is more efficient beacuse of python's interpreter when it comes to compare actual perfs.Hi. it is true. do you want me to modify the kata solution?
This is nice and consise, but goes over the
seq
twice.