leetcode
qq19971017
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
对于leetcode第五题 Longest Palindromic Substring(最长回文子串)的中心扩散法
Discription 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 va...原创 2018-12-28 21:33:07 · 263 阅读 · 0 评论 -
LeetCode 15.3Sum浅析
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Note: The solution set must not cont...原创 2018-12-29 21:58:21 · 131 阅读 · 0 评论 -
80. Remove Duplicates from Sorted Array II
Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at mosttwice and return the new length. Do not allocate extra space for another array, you must do this by mod...原创 2019-08-25 22:11:05 · 175 阅读 · 0 评论 -
33. Search in Rotated Sorted Array & 81. Search in Rotated Sorted Array II
33. Search in Rotated Sorted Array Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given...原创 2019-08-28 14:49:12 · 124 阅读 · 0 评论 -
105. Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given preorder =[3,9,20,15,7] inorder = [9,...原创 2019-09-03 21:21:54 · 113 阅读 · 0 评论 -
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,20,7] postorder = [...原创 2019-09-03 21:52:51 · 143 阅读 · 0 评论 -
120. Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], ...原创 2019-09-09 21:20:18 · 141 阅读 · 0 评论
分享