随笔分类 -  leetcode

摘要:题目:Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding eleme... 阅读全文
posted @ 2015-06-24 22:03 疾风剑 阅读(205) 评论(0) 推荐(0)
摘要:题目:判断一个数是不是回文数Determine whether an integer is a palindrome. Do this without extra space.思路:借助上一道求整数逆序的思路,判断逆序后的数和原数是否相等就行。要注意,负数都不是回文数11506 / 11506 te... 阅读全文
posted @ 2015-06-23 17:32 疾风剑 阅读(129) 评论(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 fo... 阅读全文
posted @ 2015-06-23 11:31 疾风剑 阅读(216) 评论(0) 推荐(0)
摘要:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes... 阅读全文
posted @ 2015-06-20 21:44 疾风剑 阅读(157) 评论(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-06-09 15:43 疾风剑 阅读(190) 评论(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-06-08 11:33 疾风剑 阅读(156) 评论(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-06-08 10:01 疾风剑 阅读(226) 评论(0) 推荐(0)
摘要:Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be ch... 阅读全文
posted @ 2015-06-05 10:34 疾风剑 阅读(100) 评论(0) 推荐(0)
摘要:Given two words (beginWord and endWord), and a dictionary, find the length of shortest transformation sequence from beginWord to endWord, such that:On... 阅读全文
posted @ 2015-06-03 23:50 疾风剑 阅读(197) 评论(0) 推荐(0)