mzhang-code/scala-segtree

Integer overflow

Yqwed opened this issue · 0 comments

Yqwed commented

private def mid(l: Int, r: Int): Int = (l + r) / 2 will return wrong value when l + r > Int.MaxValue