![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
梦之泪殇
自动化所2016级研究生,方向human pose estimation
展开
-
leetcode-542. 01 Matrix
题目Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.The distance between two adjacent cells is 1.给定一个由0和1组成的矩阵,找到每个单元和最近的0的距离。两个相邻单元的距离是1。 Note:The nu...原创 2018-08-14 22:25:48 · 167 阅读 · 0 评论 -
leetcode-438.Find All Anagrams in a String
题目Given a string s and a non-empty string p, find all the start indices of p's anagrams in s.Strings consists of lowercase English letters only and the length of both strings s and p will not be...原创 2018-08-17 13:31:16 · 109 阅读 · 0 评论 -
leetcode-442.Find All Duplicates in an Array
题目Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements that appear twice in this array.Could you do it without ex...原创 2018-08-17 15:43:47 · 105 阅读 · 0 评论 -
leetcode-n.Find the Longest Palindrome
题目给一个字符串,找出里面最长的回文 Example 1:Input:s: "cbaebabacd" p: "abc"Output:"bab" and "aba"思路先把所有的回文找出来,然后比较其长度,输出最大的找回文的过程通过先找"AA"或者"ABA",然后扩展两端直到找到其最大长度代码#include "stdafx.h&q原创 2018-08-17 16:32:28 · 119 阅读 · 0 评论 -
leetcode-30.Substring wih Concatenation of All Words
题目 You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a concatenation of each word in words exactly once...原创 2018-08-20 10:06:51 · 134 阅读 · 0 评论 -
leetcode-Minimum Window Substring
题目Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).Example:Input: S = "ADOBECODEBANC", T = "ABC"Output: "BANC"No...原创 2018-08-29 09:06:39 · 122 阅读 · 0 评论 -
leetcode-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 is at (i, ai) and (i, 0). Find two...原创 2018-09-08 12:03:43 · 135 阅读 · 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", which the length is 3.Example 2...原创 2018-09-06 10:51:57 · 108 阅读 · 0 评论 -
leetcode-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)).You may assume nums1 and...原创 2018-09-07 11:33:19 · 87 阅读 · 0 评论