30
04/2015
[LeetCode] Search for a Range
Search for a RangeGiven a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the order of O(log n).If ...
30
04/2015
[LeetCode] Search in Rotated Sorted Array
Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).You are given a target value to ...
29
04/2015
[LeetCode] Longest Valid Parentheses
Longest Valid ParenthesesGiven a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For &qu...
29
04/2015
[LeetCode] Isomorphic Strings
Isomorphic StringsGiven two strings s and t, determine if they are isomorphic.Two strings are isomorphic if the characters in s can be replaced to get t.All occurrences o...
29
04/2015
JS 、CSS开源工具包
1、Masonry,流式布局包http://masonry.desandro.com/ 2、Jquery,强大的js包https://jquery.com/3、css88,前端学习网http://www.css88.com/4、bootstrap,前端css框架http://www.bootcss.com/ 5、甘特图,http://www.kangry.net/blog/?type=articl...
分类: javascript, 工具/软件使用技巧 | 浏览 (3047) | 评论 (0) | 查看全文
28
04/2015
[LeetCode] Next Permutation
Next PermutationImplement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the low...
28
04/2015
[LeetCode] Count Primes
Count PrimesDescription:Count the number of prime numbers less than a non-negative number, n解题思路:题意为求小于n的质数的个数。有两种方法:1、naive办法,对小于n的每个数,检查是否为质数。而检查m是否为质数,需要验证是否都不能被2~pow(m, 0.5)整除。这个方法的时间复杂度为O(n^...
26
04/2015
在线工具集
1、反编译swf工具http://www.showmycode.com/ 2、代码格式化工具,包括HTML/XML、CSS、JSON、Javascript、Java、SQLhttp://tool.oschina.net/codeformat/xml 3、一款非常好的PDF编辑,合并,拆分工具pdfcombinehttp://www.pdfcombine.com/https://smallpdf.c...
25
04/2015
[LeetCode] Substring with Concatenation of All Words
Substring with Concatenation of All WordsYou are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that...
24
04/2015
[LeetCode] Implement strStr()
Implement strStr()Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.解题思路:1、暴力法。逐一匹配,然后回溯。代码如下,但是产生超时错误。class Solution&nbs...