Prog Lang notes and SegTree code