摘要: 1007 Maximum Subsequence Sum (25分) Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i 阅读全文
posted @ 2020-10-12 20:30 tao10203 阅读(232) 评论(0) 推荐(0)
摘要: 1006 Sign In and Sign Out (25分) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one 阅读全文
posted @ 2020-10-12 19:26 tao10203 阅读(83) 评论(0) 推荐(0)
摘要: 1002 A+B for Polynomials (25分) This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contain 阅读全文
posted @ 2020-10-12 19:10 tao10203 阅读(125) 评论(0) 推荐(0)
摘要: 题目 给你一棵所有节点为非负值的二叉搜索树,请你计算树中任意两节点的差的绝对值的最小值。 示例: 输入: 1 \ 3 / 2 输出:1 解释:最小绝对差为 1,其中 2 和 1 的差的绝对值为 1(或者 2 和 3)。 思路 本题要求二叉搜索树任意两节点差的绝对值的最小值,而我们知道二叉搜索树有个性 阅读全文
posted @ 2020-10-12 11:41 tao10203 阅读(189) 评论(0) 推荐(0)