自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 收藏
  • 关注

原创 LeetCode #20 Valid Parentheses

class Solution: # @param {string} s # @return {boolean} def isValid(self, s): tack = [] for i in range(0,len(s)): if s[i] == '(' or s[i] == '{' or s[i] == '[' o

2015-07-24 08:37:15 282

原创 LeetCode #19 Remove Nth Node From End of List

# Definition for singly-linked list.# class ListNode:# def __init__(self, x):# self.val = x# self.next = Noneclass Solution: # @param {ListNode} head # @param {intege

2015-07-23 11:57:42 228

转载 LeetCode #18 4Sum

class Solution: # @param {integer[]} nums # @param {integer} target # @return {integer[][]} def fourSum(self, nums, target): valMap = {} ans = set() nums.sort()

2015-07-23 10:49:38 250

转载 LeetCode #17 Letter Combinations of a Phone Number

class Solution: # @param {string} digits # @return {string[]} def letterCombinations(self, digits): depth = 0 ans = [] path = "" self.comb(depth,ans,digits,

2015-07-21 11:25:43 326

原创 LeetCode #16 3Sum Closest

class Solution: # @param {integer[]} nums # @param {integer} target # @return {integer} def threeSumClosest(self, nums, target): if len(nums) == 0: return None

2015-07-17 17:19:54 251

转载 【综述】(MIT博士)林达华老师-"概率模型与计算机视觉”

距上一次邀请中国科学院的樊彬老师为我们撰写图像特征描述符方面的综述(http://www.sigvc.org/bbs/thread-165-1-1.html)之后,这次我们荣幸地邀请到美国麻省理工学院(MIT)博士林达华老师为我们撰写“概率模型与计算机视觉”的最新综述。这次我们特别增设了一个问答环节,林老师针对论坛师生提出的许多问题(如概率图模型与目前很热的深度神经网络的联系和区别)一一做了详细解

2015-07-12 21:30:44 688

原创 LeetCode #15 3Sum

class Solution: # @param {integer[]} nums # @return {integer[][]} def threeSum(self, nums): if nums == None: return None if len(nums) == 0: return [

2015-07-12 15:44:12 243

原创 LeetCode #14 Longest Common Prefix

class Solution: # @param {string[]} strs # @return {string} def longestCommonPrefix(self, strs): if len(strs) == 0: return "" #find the longest substr

2015-07-12 10:40:16 264

原创 LeetCode #9 Palindrome Number

class Solution: # @param {integer} x # @return {boolean} def isPalindrome(self, x): if x < 0: return False y = 0 cX = x while x:

2015-07-12 10:02:45 269

原创 LeetCode #7 Reverse Integer

class Solution: # @param {integer} x # @return {integer} def reverse(self, x): isNegative = 1 y = 0.0 if x < 0: isNegative = -1 x = abs(x)

2015-07-11 19:00:47 428

原创 LeetCode#5 Longest Palindromic Substring

class Solution: # @param {string} s # @return {string} def longestPalindrome(self, s): lenS = len(s) maxLen = 0 maxStr = "" for i in range(0,lenS):

2015-07-11 18:17:50 424

转载 LeetCode#4 Median of Two Sorted Arrays (2)

def findKth(self,a,b,k,aStart,aEnd,bStart,bEnd): aLen = aEnd - aStart + 1 bLen = bEnd - bStart + 1 if aLen == 0: return b[bStart+k] if bLe

2015-07-09 12:23:29 361

原创 LeetCode#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)).class Solution: #

2015-07-04 07:21:25 348

原创 LeetCode #3 Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo

2015-07-03 13:43:14 281

原创 LeetCode #2 Add Two Numbers

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link

2015-07-03 07:51:55 357

原创 LeetCode #1 Two Sum

Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe

2015-07-03 07:50:18 387

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除