segment tree - SegmentTree: what are the advantages of using [l, r) (open interval on the right) in the implementation? -


i have seen segmenttree implementation uses [l, r) represent interval, while others use [l, r].

so question: why want use [left, right)? seems adds complexity in code understand if there no obvious advantages?

thanks answers in advance!


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -