Leetcode
Nannie_V
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[python版]Leetcode 106. Construct Binary Tree from Inorder and Postorder Traversal
题目 中文:根据中序后序构建二叉树 英文原题: Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given inorder = [9,3,15,...原创 2018-12-11 12:29:43 · 497 阅读 · 0 评论 -
[python] LeetCode 53. Maximum Subarray
题目描述 原题链接地址:https://leetcode.com/problems/maximum-subarray/description/ Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return ...原创 2019-01-12 11:58:30 · 149 阅读 · 0 评论 -
[python] LeetCode84. Largest Rectangle in Histogram
题目描述 Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram. 思路 用一个栈,每找到一个局部峰值时,触发while循环,向前遍历得最大值 ...原创 2019-01-13 23:04:21 · 162 阅读 · 0 评论 -
[Python]Leetcode Two Sum类题目集合
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, and you may no...原创 2019-01-27 02:03:12 · 181 阅读 · 0 评论 -
[python] 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: In...原创 2019-01-27 12:56:54 · 209 阅读 · 0 评论 -
[python] 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 wit...原创 2019-01-27 17:41:05 · 232 阅读 · 0 评论 -
[Python]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. Exa...原创 2019-02-14 23:07:39 · 218 阅读 · 0 评论 -
[python]Leetcode 647. Palindromic Substrings Medium
题目描述 Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are counted as different substrings even they cons...原创 2019-02-14 23:18:38 · 327 阅读 · 0 评论
分享