![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
magic-ice
学的越多越感觉到自己的迷茫
展开
-
LeetCode 7. Reverse Integer
LeetCode 7. Reverse Integer problem 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 ...原创 2018-11-07 09:43:20 · 88 阅读 · 0 评论 -
LeetCode 12. Integer to Roman
LeetCode 12. Integer to Roman Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C ...原创 2018-11-28 20:44:57 · 87 阅读 · 0 评论 -
LeetCode 11. Container With Most Water
原题链接 11. Container With Most Water, Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i...原创 2018-11-20 18:53:41 · 89 阅读 · 0 评论 -
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 Output: false Explanation...原创 2018-11-20 18:48:07 · 81 阅读 · 0 评论 -
LeetCode 8. String to Integer (atoi)
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 charact...原创 2018-11-14 20:46:31 · 73 阅读 · 0 评论 -
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 N A P L S I ...原创 2018-11-12 17:40:16 · 88 阅读 · 0 评论 -
LeetCode 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. Example 1: Input: “babad” Output: “bab” Note: “aba” is also a valid answer. Examp...原创 2018-11-11 17:20:27 · 76 阅读 · 0 评论 -
LeetCode 3. Longest Substring Without Repeating Characters
/* Given a string, find the length of the longest substring without repeating characters. Example 1: Input: “abcabcbb” Output: 3 Explanation: The answer is “abc”, with the length of 3. Example 2: Inpu...原创 2018-11-11 13:10:08 · 65 阅读 · 0 评论 -
LeetCode 2. 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 numbers and retur...原创 2018-11-10 20:41:44 · 77 阅读 · 0 评论 -
LeetCode 20. Valid Parentheses
/* Given a string containing just the characters ‘(’, ‘)’, ‘{’, ‘}’, ‘[’ and ‘]’, determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of ...原创 2018-11-10 19:27:37 · 100 阅读 · 0 评论 -
LeetCode 21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: Input: 1->2->4, 1->3->4 Output: 1->...原创 2018-11-10 19:23:54 · 95 阅读 · 0 评论 -
LeetCode 1. Two Sum
LeetCode 1. Two Sum Problem 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, an...原创 2018-11-06 23:50:04 · 80 阅读 · 0 评论 -
Leetcode 12. Integer to Roman
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100 D ...原创 2018-11-28 20:47:13 · 94 阅读 · 0 评论