What is a segment tree and what complexity does it give for range queries and updates? | LetsGit.IT