- 博客(9)
- 资源 (2)
- 收藏
- 关注
原创 LeetCode OJ9. Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. %3 分解出所有元素后放入vector,每个值中间插入一个1,这样所有的都会变成奇数个。然后从中间开始 循环判断是否符合要求 class Solution { public: bool isPalindrome(int x)
2016-02-28 19:45:02 210
原创 LeetCode OJ 8.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 ca
2016-02-28 19:23:49 221
原创 LeetCode OJ 7. Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 37.52% 直接用long来转换,转换后判断是否越界。 class Solution { public: int reverse (int x) {
2016-02-28 13:21:03 198
原创 LeetCode OJ 6.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 P L S I
2016-02-28 13:19:57 286
原创 LeetCode OJ 5.Longest Palindromic Substring
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 longest palindromic substring. 寻找最长回文串 有更长
2016-02-28 13:18:03 220
原创 LeetCode OJ 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)). 思路就是两个合并 cla
2016-02-28 13:17:05 277
原创 LeetCode OJ 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. For
2016-02-28 13:07:38 184
原创 LeetCode OJ 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
2016-02-28 13:06:29 230
原创 LeetCode OJ 1. Two Sum
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 exactly one solution. Example: Given nums
2016-02-28 12:59:49 179
支持vs2017的vax插件visual assist x 2214破解
2017-09-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人