On Monday, 27 November 2017 at 18:40:41 UTC, Ali Çehreli wrote:
So, it looks like the original code was accessing out of bounds and probably that's why you inserted the ((index + 3) < N) check in the D version because D was catching that error at runtime.
Yes, it is.
Which of course would skip the body of the if block, causing a difference from the original result.Yes. I fixed it in C++ version also and now both versions works same.