- 博客(14)
- 资源 (1)
- 收藏
- 关注
原创 392. Is Subsequence
Given a string s and a string t, check if s is subsequence of t.You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) string, a...
2018-05-23 20:49:12 122
原创 368. Largest Divisible Subset
Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0.If there are multiple solutions, retur...
2018-05-22 19:53:06 136
原创 494. Target Sum
You are given a list of non-negative integers, a1, a2, ..., an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its new symbol.Find out how man...
2018-05-19 16:22:15 153
原创 214. Shortest Palindrome
Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.Example 1:In...
2018-05-11 20:50:52 261
原创 516. Longest Palindromic Subsequence
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.Example 1:Input: "bbbab" Output: 4 One possible longest palindromic subseq...
2018-05-10 21:48:59 186
原创 647. Palindromic Substrings
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 consist of
2018-05-09 21:12:24 82
原创 581. Shortest Unsorted Continuous Subarray
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be sorted in ascending order, too.You need to find the
2018-05-08 21:46:48 186
原创 718. Maximum Length of Repeated Subarray
Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example 1:Input: A: [1,2,3,2,1] B: [3,2,1,4,7] Output: 3 Explanation: The repeated subarray with
2018-05-05 11:26:42 101
原创 665. Non-decreasing Array
Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element.We define an array is non-decreasing if array[i] <= array[i + 1] holds for every i
2018-05-03 21:48:35 84
原创 643. Maximum Average Subarray I
Given an array consisting of n integers, find the contiguous subarray of given length k that has the maximum average value. And you need to output the maximum average value.Example 1:Input: [1,12,-5,-6
2018-05-03 21:10:48 96
原创 746. Min Cost Climbing Stairs
On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed).Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the
2018-05-03 19:27:57 100
原创 821. Shortest Distance to a Character
Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string.Example 1:Input: S = "loveleetcode", C = 'e' Output: [3, 2, 1, 0, 1
2018-05-02 22:30:33 285
原创 796. Rotate String
We are given two strings, A and B.A shift on A consists of taking string A and moving the leftmost character to the rightmost position. For example, if A = ‘abcde’, then it will be ‘bcdea’ after one sh
2018-05-01 22:40:32 164
原创 ubuntu16.04 pcl安装教程
pcl下载,网址https://github.com/PointCloudLibrary/pcl 使用git命令或者直接下载zip文件即可。 1.安装依赖 sudo apt-get update sudo apt-get install git build-essential linux-libc-dev sudo apt-get install cmake cm
2018-05-01 16:22:10 12721
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人