![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Leetcode
SniperMarus
这个作者很懒,什么都没留下…
展开
-
Leetcode No.59 Spiral Matrix II
题目:https://leetcode.com/problems/spiral-matrix-ii/submissions/简介:额怎么说这道题目比较考验边界条件的考虑和程序设计,没有什么特别难的点和思路,只要把边界条件设置情况,穷举的思路就可以得到解答,不过在Discuss里面却发现一个很有意思的解答,加入前后左右的方向二元向量,让边界条件的选取多了一丝趣味,之前更多想从Matrix本身角度考...原创 2019-04-03 21:46:19 · 116 阅读 · 0 评论 -
Leetcode No.873 Length of Longest Fibonacci Subsequence
题目:https://leetcode.com/problems/length-of-longest-fibonacci-subsequence/submissions/class Solution { public int lenLongestFibSubseq(int[] A) { int N = A.length; int n = 0; ...原创 2019-04-03 22:49:02 · 148 阅读 · 0 评论 -
Leetcode 3. Longest Substring Without Repeating Characters
题目:https://leetcode.com/problems/longest-substring-without-repeating-characters/简介:又是一推范围条件判断。。。class Solution(object): def lengthOfLongestSubstring(self, s): """ :type s: str ...原创 2019-04-05 21:30:17 · 76 阅读 · 0 评论 -
Leetcode No.1014 Best SightSeeing Pair
题目:https://leetcode.com/problems/best-sightseeing-pair/简介:SightSeeing Score 计算:对于SightSeeing Spots的数组,The score of a pair (i < j) of sightseeing spots is (A[i] + A[j] + i - j) : the sum of the v...原创 2019-04-06 20:36:03 · 128 阅读 · 0 评论 -
Leetcode No.7 Reverse Integer
题目:https://leetcode.com/problems/reverse-integer/简介:这道题目没什么特别介绍的,相对容易。class Solution { public int reverse(int x) { long res = 0; while (x != 0) { int num = x % 10; ...原创 2019-04-06 20:46:19 · 89 阅读 · 0 评论 -
Leetcode64-Minimum Path Sum
题目:https://leetcode.com/problems/minimum-path-sum/submissions/简介:题目也主要是以DP作为核心思想吧,在翻看过评论体系内的阐述和大部分解法,确实都离不开DP的核心点,所以今天这题就没有过多的赘述,不过确实也正是触及到我昨天提到的过程之上的思考点,就是当前目标解是动态变化的,在此题中的方向就是当前目标解与上一目标解之前存在定量的转化关...原创 2019-04-01 21:55:11 · 119 阅读 · 0 评论