Closed xqian closed 11 years ago
@xqian test notification
pre_order recursive:(5) pre_order recursive:(5(3),) pre_order recursive:(5,(6)) pre_order recursive:(5(3),(6)) pre_order recursive:(5,(90(40(20(10,(13(12(11),),(15))),(30,(35))),(60(50,(55)),(70(65,(68)),))),))
using a stack to contain all the elements in the string; when encounter an ')', try to pop until '('; put pop out elements into a queue, and from begin to end construct a BST
The last commitment must have memory leak. So I need to clear it.
do it in the bst.cc