Support 3 kinds of opertions: max, len, sum.