02 2017 档案
摘要://283public class Solution { public void moveZeroes(int[] nums) { int flag = 0; for(int i=0; i map = new HashMap(); f...
阅读全文
摘要:例如414,用java做的话好多坑,以后就用java刷leetcode了。//414public class Solution { public int thirdMax(int[] nums) { Integer max1 = null; //不能使用Inte...
阅读全文
摘要:今天发现leetcode比别的都好。。。因为面试面到121题,我愚笨的脑袋用了两个for循环,只用一个for循环我是想不出的。 121:class Solution {public: int maxProfit(vector& prices) { size_t ...
阅读全文
摘要:一开始我用两个循环,如果只用一个循环的话:int maxProfit(vector& prices) { size_t size = prices.size(); if (size <= 1) return 0; int min = INT...
阅读全文
摘要:concurrentHashMap 线程池的几种常见的创建的方式
阅读全文
摘要:http://blog.csdn.net/u014033756/article/details/505998791、HashSet底层是采用HashMap实现的。HashSet 的实现比较简单,HashSet 的绝大部分方法都是通过调用 HashMap 的方法来实现的,因此 Has...
阅读全文
摘要:refer to :http://www.cnblogs.com/inspurhaitian/p/4647485.html我是一名java开发人员,hibernate以及mybatis都有过学习,在java面试中也被提及问道过,在项目实践中也应用过,现在对hibernate和myb...
阅读全文
摘要:poj3176//648k, 32ms#include using namespace std;const int MAX_N = 355;int way[MAX_N][MAX_N];int n;int max(int a, int b) { return a>b ? a :...
阅读全文
摘要:对牛按照milk的开始时间排序。 对优先队列里牛的milk的结束时间排序,结束时间最早的作为que.top()和牛i做对比,如果牛i的开始时间大于(因为文中说include A和B,所以不能取等号。)que.top()的结束时间,那么将该牛的牛栏(stall)设为与que.top(...
阅读全文
摘要:把log4j.properties放在src下的config文件夹里。如果报错Log4j不能找到配置文件,使用的是myeclipse的话,在config文件夹上右键–》buildpath–>use as source folder即可。原因如下: 我添加log4j.jar后删除了c...
阅读全文
摘要://4108k, 485ms#include #include using namespace std;int c[1010][1010] ;int lowbit(int x){ return x & -x ;}void add(int i,int j,int d){ ...
阅读全文
摘要:Java面试题全集(上) Java面试题全集(中) Java面试题全集(下) 骆昊的技术专栏
阅读全文
摘要:平常的java开发中,程序员在某个类中需要依赖其它类的方法,则通常是new一个依赖类再调用类实例的方法,这种开发存在的问题是new的类实例不好统一管理,spring提出了依赖注入的思想,即依赖类不由程序员实例化,而是通过spring容器帮我们new指定实例并且将实例注入到需要该对象...
阅读全文

浙公网安备 33010602011771号