- 博客(16)
- 资源 (33)
- 收藏
- 关注
原创 [leetcode]438. Find All Anagrams in a String
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings consists of lowercase English letters only and the length of both strings s and p will not be lar
2017-01-23 17:00:20 1054
原创 [leetcode]437. Path Sum III
You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does not need to start or end at the root or a leaf, but it
2017-01-23 16:18:45 1050
原创 复合索引的优点和注意事项
概念: 单一索引是指索引列为一列的情况,即新建索引的语句只实施在一列上; 用户可以在多个列上建立索引,这种索引叫做复合索引(组合索引); 复合索引在数据库操作期间所需的开销更小,可以代替多个单一索引; 同时有两个概念叫做窄索引和宽索引,窄索引是指索引列为1-2列的索引,宽索引也就是索引列超过2列的索引; 设计索引的一个重要原则就是能用窄索引不用宽索
2017-01-21 15:33:42 6759 5
原创 [leetcode]303. Range Sum Query - Immutable
Given an integer array nums, find the sum of the elements between indicesi and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumRange(0, 2) -> 1sumRange(2, 5) -> -1sumRang
2017-01-07 23:10:10 1036
原创 [leetcode]189. Rotate Array
Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to[5,6,7,1,2,3,4].Note:Try to come up as many solutions as you can
2017-01-06 23:02:02 1042
原创 [leetcode]414. Third Maximum Number
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).Example 1:Input: [3, 2, 1
2017-01-06 22:31:20 1010
转载 Java多线程 -- Map容器性能比较
单线程单线程环境下可以使用HashMap和TreeMap。TreeMap上遍历返回结果是按照Key排序的。测试方法记录写入Map中N条记录的时间,单位毫秒。记录从N条记录的Map中读取10W条记录的时间,单位毫秒。N=25W,50W,75W,100W测试结果写N条记录25W 50W 75W 100WHashMap284
2017-01-05 22:43:14 1328
原创 [leetcode]225. Implement Stack using Queues
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get the top element.empty() -- Return whet
2017-01-05 22:25:09 1080
原创 [leetcode'396. Rotate Function
Given an array of integers A and let n to be its length.Assume Bk to be an array obtained by rotating the arrayA k positions clock-wise, we define a "rotation function" F on A as follow:F(k) =
2017-01-04 20:47:17 1061
原创 [reading notes] css W3school reading notes
CSS 指层叠样式表 (Cascading Style Sheets)内容与表现分离的问题一般而言,所有的样式会根据下面的规则层叠于一个新的虚拟样式表中,其中数字 4 拥有最高的优先权。浏览器缺省设置外部样式表内部样式表(位于 标签内部)内联样式(在 HTML 元素内部)selector {property: value}p
2017-01-02 16:44:30 1272
原创 [leetcode]475. Heaters
Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses.Now, you are given positions of houses and heaters on a horizontal li
2017-01-02 13:31:18 1716
原创 [leetcode]102. Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20
2017-01-02 10:33:06 1219
转载 Java遍历树(深度优先+广度优先)
在编程生活中,我们总会遇见树性结构,这几天刚好需要对树形结构操作,就记录下自己的操作方式以及过程。现在假设有一颗这样树,(是不是二叉树都没关系,原理都是一样的) 1、深度优先英文缩写为DFS即Depth First Search.其过程简要来说是对每一个可能的分支路径深入到不能再深入为止,而且每个节点只能访问一次。对于上面的例子来说深度优先遍历的结果就是:A,B,D,E,I,C,F
2017-01-01 16:27:04 916
原创 java中队列的使用
Queue接口与List、Set同一级别,都是继承了Collection接口。LinkedList实现了Queue接口。Queue接口窄化了对LinkedList的方法的访问权限(即在方法中的参数类型如果是Queue时,就完全只能访问Queue接口所定义的方法 了,而不能直接访问 LinkedList的非Queue的方法),以使得只有恰当的方法才可以使用。BlockingQueue 继承了Qu...
2017-01-01 16:15:38 32206 2
原创 [leetcode]107. Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree [3,9,20,null,null,15,
2017-01-01 16:02:45 1085
原创 [leetcode]441. Arranging Coins
You have a total of n coins that you want to form in a staircase shape, where everyk-th row must have exactly k coins.Given n, find the total number of full staircase rows that can be formed.n i
2017-01-01 10:02:00 1029
Java 并发编程实战(英文版)
2017-01-07
Java RESTful Web Service实战 高清完整.pdf版下载
2017-01-01
Java RESTful Web Service实战 [韩陆著]
2016-12-31
大型网站技术架构:核心原理与案例分析+李智慧
2016-12-31
Spring 3.x 企业应用开发实战】完整高清扫描版).pdf
2016-07-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人