剑指offer
SpuerWei
王筱维童鞋努力coding!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
剑指offer19,二叉树的镜像 -- LeetCode #226
public class test19{ public TreeNode invertTree(TreeNode root) { if(root == null) return root; if(root.left == null && root.right == null) return root; TreeNode temp = root.le...原创 2019-04-19 00:46:59 · 323 阅读 · 0 评论 -
剑指offer20,顺时针打印矩阵 -- LeetCode #54 spiralOrder
public class test20{ public List<Integer> spiralOrder(int[][] matrix) { List answer = new ArrayList(); if(matrix.length == 0) return answer; int rows = m...原创 2019-04-19 00:49:28 · 207 阅读 · 0 评论 -
剑指offer25 -- LeetCode #112 Path Sum
public class test25 { public boolean hasPathSum(TreeNode root, int sum) { if(root == null) return false; if(root.left == null && root.right == null && ...原创 2019-04-19 00:51:15 · 192 阅读 · 0 评论
分享