摘要: Implement regular expression matching with support for '.' and '*'. 定位:困难题 题目给出两种匹配规则,即'.'能匹配任何字符,'*'可以将前面一个字符重复0到任意次。 此时我们将'*'与其前一个字符合看为一个单元考虑。存在以下情况 阅读全文
posted @ 2017-06-17 16:22 仰恩 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. 定位:简单题 题目要求判断给出的数字是否是回文数,并且要求不适用额外空间。我们不能使用其他数据类型过度处理,那从个位开始计算,每提高计算一位将原先的值 阅读全文
posted @ 2017-06-17 16:11 仰恩 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below 阅读全文
posted @ 2017-06-17 16:06 仰恩 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Note:The input is assumed to be a 32-bit signed integer. Yo 阅读全文
posted @ 2017-06-17 15:55 仰恩 阅读(128) 评论(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 阅读全文
posted @ 2017-06-03 23:16 仰恩 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: 定位:中等题 找到给定的字符串中 阅读全文
posted @ 2017-06-03 23:08 仰恩 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 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 sh 阅读全文
posted @ 2017-06-03 23:04 仰恩 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2017-06-03 23:01 仰恩 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 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 contai 阅读全文
posted @ 2017-06-03 22:58 仰恩 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
posted @ 2017-06-03 22:04 仰恩 阅读(77) 评论(0) 推荐(0) 编辑