摘要:
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =... 阅读全文
摘要:
在JDK(Java Development Kit)类库中,开发人员使用了大量设计模式,正因为如此,我们可以在不修改JDK源码的前提下开发出自己的应用软件,本文列出了部分JDK中的模式应用实例,有兴趣的童鞋可以深入研究,看看前Sun公司的开发人员是如何在实际框架开发中运用设计模式的,,Sunny认为... 阅读全文
摘要:
http://blog.csdn.net/pickless/article/details/9191075Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7migh... 阅读全文
摘要:
1.利用荷兰国旗的思路,每次记住最后一个位置,遇到一个不重复的数,放在它后面,代码很简单。Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the... 阅读全文
摘要:
two sum https://oj.leetcode.com/submissions/detail/8220548/public class Solution { public int[] twoSum(int[] numbers, int target) { int a[]=... 阅读全文