原题戳我Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha...
分类:
其他好文 时间:
2014-08-26 00:14:25
阅读次数:
334
Query
Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 2595 Accepted Submission(s): 860
Problem Description
You are given two s...
分类:
其他好文 时间:
2014-08-25 21:12:44
阅读次数:
281
Description
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication,
exponenti...
分类:
其他好文 时间:
2014-08-25 21:11:14
阅读次数:
183
Description
Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such tha...
分类:
编程语言 时间:
2014-08-25 19:20:04
阅读次数:
230
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路: 1 cla...
分类:
其他好文 时间:
2014-08-25 18:38:04
阅读次数:
211
Description
Problem C
Polynomial GCD
Input: standard input
Output: standard output
Given two polynomials f(x) and g(x) in
Zn, you have to find their GCD polynomial, ie, a polynomial
r(x)...
分类:
其他好文 时间:
2014-08-25 17:09:34
阅读次数:
209
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".思路: 1 class Solution { 2 public: 3 strin...
分类:
其他好文 时间:
2014-08-25 16:58:34
阅读次数:
188
Now a days a very common problem is:“The coordinate of two points in Cartesian coordinate system is (200, 300) and(4000, 5000). If these two points are connected we get a line segment. How manylattice...
分类:
其他好文 时间:
2014-08-24 23:54:33
阅读次数:
406
N-Queens
Total Accepted: 12866 Total
Submissions: 49759My Submissions
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens
attack each oth...
分类:
其他好文 时间:
2014-08-24 22:21:03
阅读次数:
166
题目描述:
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The median of two sequences is defined to be...
分类:
其他好文 时间:
2014-08-24 19:24:22
阅读次数:
235