- 博客(5)
- 收藏
- 关注
原创 Longest Common Prefix leetcode 14
Write a function to find the longest common prefix string amongst an array of strings. 找所有字符串的公共前缀,简单地实现题class Solution { public: string strPrefix(string s1,string s2){ if(s1.length()==0||s
2015-06-15 18:14:44 282
原创 Clone Graph Leetcode 133
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ’s undirected graph serialization:Nodes are labeled uniquely. We use # as a separator for each node, an
2015-06-14 22:50:11 298
原创 Distinct Subsequences leetcode 115
Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of
2015-06-09 17:55:26 319
原创 Multiply Strings leetcode 43
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-negative.经典的大数相乘问题: 1,从给定字符串最后一位开始操作,要弄清楚整个乘法的过程以及各进位的
2015-06-03 23:48:49 439
原创 Edit Distance Leetcode 72
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 have the following 3 operations permitted on a word:a) In
2015-06-02 23:31:41 350
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人