
个人观点
lstrue
对软件开发感兴趣,喜欢独立思考和解决问题
展开
-
数据结构中confusing的地方整理
//时间复杂度 //PriorityQueue,peek当然是O(1),offer和poll是O(logn)-你想想把值插进去最慢也是O(n)了如果这样了用PQ做什么 //LinkedList,add,addFirst,addLast,remove,removeFirst,removeLast都是O(1),而remove(int index)需要指针走过去所以需要O(n) //Java中Arra...原创 2020-04-07 04:54:47 · 202 阅读 · 0 评论 -
我读过的额Spring 原创非常好的网站
spring 监听器 IntrospectorCleanupListener简介: http://blog.youkuaiyun.com/fooe84/archive/2006/04/28/695150.aspx Spring的核心机制依赖注入简介: http://developer.51cto.com/art/200610/33311.htm Spring中的ContextL原创 2010-03-30 11:03:00 · 404 阅读 · 0 评论 -
几个比较好的java学习网站(Struts,Servlet,jar源码,hibernate,java基础知识)
servlet与Struts action线程安全问题分析: http://hi.baidu.com/platon/blog/item/64a20ff3f96e7fce0b46e031.html 搜索java源码(当然也可以通过下载源码或是反编译的方式,但是这个网站方便对于不需要批量查看源码的朋友使用): http://kickjava.com/ jav原创 2010-03-30 10:47:00 · 753 阅读 · 0 评论 -
poi读取excel时数字类型的解决方法
在用poi读取excel的时候的时候会遇到数字类型,解决科学计数法显示及存入数据库原来的格式的解决方法: case HSSFCell.CELL_TYPE_NUMERIC: double strCell = cell.getNumericCellValue(); DecimalFormat formatC原创 2010-04-07 14:43:00 · 2480 阅读 · 1 评论 -
Leetcode 28, Strstr
//思路:双指针,因为两个string肯定二个循环。遍历整个长字符(减去短字符)作为起点,双指针长字符和短字符逐一比较。 //答案综合https://leetcode.com/discuss/95153/java-easy-to-understand-solutions(双指针比较清晰)和爱做饭第一个(答案返回string过时了, //第二个没必要)。 public int strStr转载 2016-05-31 13:56:53 · 240 阅读 · 0 评论 -
Leetcode 34, Search for a Range
public int[] searchRange(int[] nums, int target) { if(nums == null || nums.length == 0){ return null; } int[] result = {-1, -1}; //binary search, 2 times原创 2016-07-13 14:27:23 · 200 阅读 · 0 评论