随笔分类 -  LeetCode 编程之路

摘要:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element.The... 阅读全文
posted @ 2015-07-19 13:37 Mad.King 阅读(162) 评论(0) 推荐(0)
摘要:题意将一个含数字的字符串转换成int型思路实现并不困难,主要考虑各种情况。1.字符串是不是空字符串;2.字符串带空格或其他字符怎么办;3.带正负号的处理;4.字符串中的数超过int型的范围怎么办(int 范围:-2147483648~2147483647 0x80000000~0x7fffffff)... 阅读全文
posted @ 2015-07-19 13:27 Mad.King 阅读(135) 评论(0) 推荐(0)
摘要:The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo... 阅读全文
posted @ 2015-07-19 13:12 Mad.King 阅读(184) 评论(0) 推荐(0)
摘要:There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should... 阅读全文
posted @ 2015-07-18 21:10 Mad.King 阅读(123) 评论(0) 推荐(0)
摘要:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo... 阅读全文
posted @ 2015-07-18 20:57 Mad.King 阅读(128) 评论(0) 推荐(0)
摘要: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 ... 阅读全文
posted @ 2015-07-18 19:54 Mad.King 阅读(95) 评论(0) 推荐(0)
摘要: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 nu... 阅读全文
posted @ 2015-07-16 22:12 Mad.King 阅读(122) 评论(0) 推荐(0)