- 博客(6)
- 问答 (1)
- 收藏
- 关注
原创 [Leetcode]解题文档-String to Integer (atoi)
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 and ask yourself what are the possible input cas
2016-05-07 22:19:17 830 1
原创 [Leetcode]解题文档- Reverse Integer
题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 题目意思很简单,但是需要考虑溢出。 尝试了字符串的解法和纯int数字解,发现后者效率更高,那么笔者是如何判断是否溢出的呢?比如1234567899,正序不溢出,逆序溢出。 做法:先判断位数,
2016-05-07 19:55:18 1075
原创 [Leetcode]解题文档-ZigZag Conversion
题目: 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 for better legibility) P A H N A
2016-05-07 13:41:00 960 2
原创 [Leetcode]解题文档-Longest Palindromic Substring
5. Longest Palindromic SubstringGiven 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 longest palindromic subst
2016-05-05 22:19:16 637
原创 [Leetcode]解题文档-Median of Two Sorted Arrays
4. Median of Two Sorted ArraysThere 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)).
2016-05-05 12:04:45 695
原创 [Leetcode]解题文档-Longest Substring Without Repeating Characters
[这个问题之前面试中有问到过,还是值得学习下的~]3. Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is
2016-05-05 02:25:50 662
空空如也
linux 正则表达式问题
2015-10-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人