标签:des blog http sp for on 2014 log bs
Given a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node.
自己想的复杂了,其实就是一个反向的inorder。新的值就是前面所有元素的求和。
Transform a BST to greater sum tree
标签:des blog http sp for on 2014 log bs
原文地址:http://www.cnblogs.com/linyx/p/4085076.html