![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LintCode
文章平均质量分 52
gamesluo
这个作者很懒,什么都没留下…
展开
-
[LintCode]Longest Common Prefix(Python)
class Solution: # @param strs: A list of strings # @return: The longest common prefix def longestCommonPrefix(self, strs): # write your code here minlen = 99999 for原创 2017-08-05 20:19:18 · 227 阅读 · 0 评论 -
[LintCode]Sort Integers(C++)
class Solution {public: /** * @param A an integer array * @return void */ void sortIntegers(vector& A) { // Write your code here int length = A.size();原创 2017-08-05 15:14:07 · 160 阅读 · 0 评论 -
[LintCode]Fibonacci(Python)
class Solution: """ @param: : an integer @return: an ineger f(n) """ def fibonacci(self, n): # write your code here ret = [0, 1] for i in range(原创 2017-08-05 15:17:32 · 214 阅读 · 0 评论 -
[LintCode]Rectangle Area(Java)
public class Rectangle { /* * Define two public attributes width and height of type int. */ // write your code here private int width; private int height; /*原创 2017-08-05 15:19:05 · 699 阅读 · 0 评论 -
[LintCode]Binary Tree Maximum Node(C++)
class Solution {public: /** * @param root the root of binary tree * @return the max node */ TreeNode* max = new TreeNode(INT_MIN); TreeNode* maxNode(TreeNode*原创 2017-08-05 15:20:11 · 208 阅读 · 0 评论 -
[LintCode]Two Strings Are Anagrams(C++|Java|Python)
C++ Version:class Solution {public: /** * @param s: The first string * @param b: The second string * @return true or false */ bool anagram(string s, string t) {原创 2017-08-05 15:24:58 · 286 阅读 · 0 评论 -
[LintCode]Compare Strings(C++|Python)
C++ Version:class Solution {public: /** * @param A: A string includes Upper Case letters * @param B: A string includes Upper Case letter * @return: if string A contains all原创 2017-08-05 20:04:25 · 364 阅读 · 0 评论 -
[LintCode]strStr(C++)
class Solution {public: /** * Returns a index to the first occurrence of target in source, * or -1 if target is not part of source. * @param source string to be scanned.原创 2017-08-05 20:05:38 · 253 阅读 · 0 评论 -
[LintCode]Anagrams(Python)
class Solution: # @param strs: A list of strings # @return: A list of strings def anagrams(self, strs): # write your code here ret = [] strs_reag = []原创 2017-08-05 20:06:25 · 494 阅读 · 0 评论 -
[LintCode]Longest Common Substring(Python)
class Solution: # @param A, B: Two string. # @return: the length of the longest common substring. def longestCommonSubstring(self, A, B): # write your code here maxlength =原创 2017-08-05 20:10:29 · 524 阅读 · 0 评论 -
[LintCode]Remove Element(Python)
class Solution: """ @param A: A list of integers @param elem: An integer @return: The new length after remove """ def removeElement(self, A, elem): # write your code he原创 2017-08-08 07:57:09 · 185 阅读 · 0 评论 -
[LintCode]Remove Linked List Elements(C++)
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: /*原创 2017-08-05 15:09:25 · 233 阅读 · 0 评论