# [leetcode题解]9. Palindrome Number

Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Outpu …

Continue reading

# [leetcode题解]8. String to Integer (atoi)

Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-whitespace character is found. Then, sta …

Continue reading

# [leetcode题解]7. Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Input: 120 Output: 21 Note: Assume we are dealing with an …

Continue reading

# [leetcode题解]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 …

Continue reading

Continue reading

# [leetcode题解]03.Longest Substring Without Repeating Characters

Given a string, find the length of the longest substring without repeating characters. Examples: Given “abcabcbb”, the answer is “abc”, which the length is …

Continue reading

# [leetcode题解]02.Add Two Numbers

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 contain a single digit. Add the two …

Continue reading

# [leetcode题解]001.Two Sum

You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, ret …

Continue reading

# leetcode题解刷题汇总

leetcode题目不断刷新，大家也都一直在刷，本文记录作者刷题记录，一直更新，权当抛砖引玉，欢迎大家一块交流学习。如果各位leetcoder发现题解有问题，欢迎指正交流，也希望大家可以提出更新颖的解题方法。新建leetcode算法交流群259150720，欢迎leetcoder进群交流。 0001 Two Sum array Easy 0002 Add Two Numbers linked li …

Continue reading

Continue reading