예제 #1
0
파일: ag_222.py 프로젝트: xiaolongnk/Alglib
def run():
    ns = Solution()
    from common import CommonUtil
    root = None
    root = CommonUtil.generateTree(root)
    CommonUtil.printTree(root)
    print ns.countNodes(root)
예제 #2
0
def run():
    ns = Solution()
    from common import CommonUtil
    root = None
    root = CommonUtil.generateTree(root)
    CommonUtil.printTree(root)
    print ns.countNodes(root)
예제 #3
0
def run():
    from common import CommonUtil
    root = None
    root = CommonUtil.generateTree(root)
    CommonUtil.printTree(root, 0)
    ns = Solution()
    ret = ns.pathSum(root, 17)
    print ret
예제 #4
0
파일: ag_112.py 프로젝트: xiaolongnk/Alglib
def run():
    from common import CommonUtil
    root = None
    root = CommonUtil.generateTree(root)
    CommonUtil.printTree(root , 0)
    ns = Solution()
    ret = ns.hasPathSum(root , 17)
    print ret
예제 #5
0
파일: ag_257.py 프로젝트: xiaolongnk/Alglib
def run():
    from common import CommonUtil
    root = None
    root = CommonUtil.generateTree(root)
    CommonUtil.printTree(root , 0)
    ns = Solution()
    ret = ns.binaryTreePaths(root)
    print ret