摘要:
确定目标问题规模(参数)必须能缩小,否则就添加参数解决原子问题就是解决返回值的原子数据 leetcode-144-二叉树的前序遍历 class Solution { public List<Integer> preorderTraversal(TreeNode root) {//原问题的res Li 阅读全文
摘要:
public class Solution { /** * @param s: a string, encoded message * @return: an integer, the number of ways decoding */ public static int numDecodings 阅读全文
摘要:
public class Solution { /** * @param costs: n x 3 cost matrix * @return: An integer, the minimum cost to paint all houses */ public int minCost(int[][ 阅读全文