原题链接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ class Solution { public int lengthOfLongestSubstring(String s) { ...
分类:
其他好文 时间:
2020-12-25 11:54:02
阅读次数:
0
题目来源:https://leetcode-cn.com/problems/longest-palindromic-substring/submissions 思路:动态规划(参看官方解析) 关键点: 1:对于字符串长度大于2,状态转移方程:P(i,j)=P(i+1,j?1) && (Si?==Sj ...
分类:
其他好文 时间:
2020-12-18 12:45:33
阅读次数:
3
题目 方法一:动态规划 我们可以维护一个数组$dp[]$,$dp[i]$表示以$nums[i]$为结尾元素的最长上升子序列的长度。在计算$dp[i]$之前,我们已经计算出了$dp[0....i-1]$的值,考虑在$num[i]$之前的最长子序列的尾部加上$nums[i]$, $dp[j]$代表$nu ...
分类:
其他好文 时间:
2020-12-16 11:50:45
阅读次数:
4
1 class Solution { 2 public String longestPalindrome(String s) { 3 if(s.equals("")) return ""; 4 String origin = s; 5 String reverse = new StringBuffe ...
分类:
其他好文 时间:
2020-12-14 13:43:53
阅读次数:
4
非商业,LeetCode链接附上: https://leetcode-cn.com/problems/longest-increasing-subsequence/ 进入正题。 题目: 给定一个无序的整数数组,找到其中最长上升子序列的长度。 示例: 输入: [10,9,2,5,3,7,101,18] ...
分类:
其他好文 时间:
2020-12-10 10:49:44
阅读次数:
2
leetcode41.缺失的第一个正数--每天刷一道leetcode算法系列!作者:reed,一个热爱技术的斜杠青年,程序员面试联合创始人前文回顾:leetcode1.两数之和--每天刷一道leetcode系列!leetcode2.两数相加--每天刷一道leetcode系列!leetcode3.无重复字符的最长子串--每天刷一道leetcode系列!leetcode4.寻找两个有序数组的中位数--
分类:
编程语言 时间:
2020-12-10 10:38:15
阅读次数:
4
leetcode25.K个一组翻转链表--每天刷一道leetcode算法系列!?作者:reed,一个热爱技术的斜杠青年,程序员面试联合创始人前文回顾:leetcode1.两数之和--每天刷一道leetcode系列!leetcode2.两数相加--每天刷一道leetcode系列!leetcode3.无重复字符的最长子串--每天刷一道leetcode系列!leetcode4.寻找两个有序数组的中位数-
分类:
编程语言 时间:
2020-12-10 10:37:56
阅读次数:
6
leetcode11.盛最多水的容器作者:reed,一个热爱技术的斜杠青年,程序员面试联合创始人前文回顾:leetcode1.两数之和--每天刷一道leetcode系列!leetcode2.两数相加--每天刷一道leetcode系列!leetcode3.无重复字符的最长子串--每天刷一道leetcode系列!leetcode4.寻找两个有序数组的中位数--每天刷一道leetcode系列!leeet
分类:
其他好文 时间:
2020-12-10 10:37:40
阅读次数:
1
leetcode4.寻找两个有序数组的中位数--每天刷一道leetcode系列!作者:reed,一个热爱技术的斜杠青年,程序员面试联合创始人前文回顾:leetcode1.两数之和--每天刷一道leetcode系列!leetcode2.两数相加--每天刷一道leetcode系列!leetcode3.无重复字符的最长子串--每天刷一道leetcode系列!题目描述给定两个大小为m和n的有序数组nums
分类:
编程语言 时间:
2020-12-10 10:37:19
阅读次数:
6
leetcode3.无重复字符的最长子串--每天刷一道leetcode系列!作者:reed,一个热爱技术的斜杠青年,程序员面试联合创始人前文回顾:leetcode1.两数之和--每天刷一道leetcode系列!leetcode2.两数相加--每天刷一道leetcode系列!题目描述给定一个字符串,请你找出其中不含有重复字符的最长子串的长度。示例1:输入:"abcabcbb"输出
分类:
其他好文 时间:
2020-12-10 10:37:04
阅读次数:
1