1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. Given an integer n, generate the nth term of the count-and-say sequence. Note: Each ...
Modify时,把array里面的value带进去,找到特定的位子(leaf),然后count+1. 最终在SegmentTree leaf上面全是array里面实际的数字。 若给出一个固定的array构成 SegmentTree,那估计很简单:按照index从0~array ...