问题:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter...
分类:
编程语言 时间:
2014-08-21 22:47:14
阅读次数:
184
leetcode的题目Given two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You h...
分类:
其他好文 时间:
2014-08-21 22:29:54
阅读次数:
279
Theandcoordinates of the point of intersection of two non-vertical lines can easily be found using the following substitutions and rearrangements.Supp...
分类:
其他好文 时间:
2014-08-21 18:31:04
阅读次数:
189
《编程之美》里的一个题目:能否快速找出一个数组中的两个数字,让这两个数字之和等于一个给定的值,假设这个数组中肯定存在至少一组符合要求的解。 LeetCode的题目: Given an array of integers, find two numbers such that they add up ...
分类:
其他好文 时间:
2014-08-21 14:45:44
阅读次数:
186
Median of Two Sorted Arrays
Total Accepted: 17932 Total
Submissions: 103927My Submissions
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sort...
分类:
其他好文 时间:
2014-08-21 13:24:54
阅读次数:
206
1A! We get median of each array and compare them, then we know which half should be disguarded and how many should be disguarded.class Solution {publi...
分类:
其他好文 时间:
2014-08-21 13:13:24
阅读次数:
191
jQuery异步获取json数据有2种方式,一个是$.getJSON方法,一个是$.ajax方法。本篇体验使用这2种方式异步获取json数据,然后追加到页面。 在根目录下创建data.json文件:{ "one" : "Hello", "two" : "World"}■ 通过$.getJSON方法获...
分类:
Web程序 时间:
2014-08-21 13:03:14
阅读次数:
188
单位符号的英语说法1/2 = a (or one) half1/3 = a (or one) third1/4 = a quarter or one fouth1/5 = a (or one) fifth2/3 = two thirds9/10 = nine tenths53/4 = five an...
分类:
其他好文 时间:
2014-08-21 09:45:43
阅读次数:
304
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:
其他好文 时间:
2014-08-21 00:01:23
阅读次数:
293
6、实用函数 ● 修剪字符串$('#id').val($.trim($('#someid').val()))● 遍历集合可能这样写:var anArray = ['one','two'];for(var n = 0; n 3;})console.log(arr);//结果是:4 5 6如果把grep...
分类:
Web程序 时间:
2014-08-20 23:53:33
阅读次数:
356