Segment Tree Build(LintCode 201):

Problem