04 2017 档案
二叉树的花式遍历
摘要:1、前序遍历 递归: public class preOrder_recursion { public static void preOrder(BinaryTreeNode root) { if (root == null) { return; } System.out.print(root.va 阅读全文
posted @ 2017-04-18 09:59 阳小徐 阅读(181) 评论(0) 推荐(0)
kSum问题总结
摘要:1、2Sum 题目: 方法一:两次迭代 public class TwoSum { public static int[] twoSum(int[] nums, int target) { int[] indices = {-1,-1}; for(int i=0; i<nums.length-1; 阅读全文
posted @ 2017-04-17 22:58 阳小徐 阅读(1000) 评论(1) 推荐(0)