
Leetcode
anoperA
啦啦啦
展开
-
3. Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is 3. Given “bbbbb”, the answe原创 2017-09-30 16:13:31 · 225 阅读 · 0 评论 -
寻找最大回文字符串(python)
A = "fccf edfgfde"max_sub = []for i in range(len(A)-1): tmp = [] if A[i]==A[i+1]: tmp.append(A[i]) tmp.append(A[i+1]) j = 1 while i-j>=0 and i+1+j<len(A)-1:原创 2017-10-10 20:34:03 · 2133 阅读 · 0 评论 -
4. Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).Example 1: nums1 = [1, 3] num原创 2017-10-04 16:53:09 · 522 阅读 · 0 评论 -
2. Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and ret原创 2017-09-30 15:27:47 · 179 阅读 · 0 评论