![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
燃烧的冷水
这个作者很懒,什么都没留下…
展开
-
[LeetCode] Longest Substring Without Repeating Characters
https://leetcode.com/problems/longest-substring-without-repeating-characters/ description: Given a string, find the length of thelongest substringwithout repeating characters. Example 1: Input...原创 2019-07-07 21:57:08 · 87 阅读 · 0 评论 -
[LeetCode] Add Two Numbers
https://leetcode.com/problems/add-two-numbers/ You are given twonon-emptylinked lists representing two non-negative integers. The digits are stored inreverse orderand each of their nodes contain a...原创 2019-06-29 20:05:30 · 82 阅读 · 0 评论 -
[LeetCode] Longest Palindromic Substring
题目链接:https://leetcode.com/problems/longest-palindromic-substring/ description: Given a strings, find the longest palindromic substring ins. You may assume that the maximum length ofsis 1000. pa...原创 2019-07-14 18:52:02 · 77 阅读 · 0 评论 -
[LeetCode] ZigZag Conversion
题目链接:https://leetcode.com/problems/zigzag-conversion/submissions/ 思路: 假设最后一个顶点总是在上面的,会有如下两种情况: func convert(s string, numRows int) string { if 1 == numRows { return s } bytes := []byte(s...原创 2019-07-21 22:02:57 · 86 阅读 · 0 评论 -
[LeetCode] Container With Most Water
题目链接:https://leetcode.com/problems/container-with-most-water/ 一开始我采用了遍历对比了每个可能的面积,后来参考了题目里给出的解决思路: 面积由距离和高度决定,而两个指定点之间的面积大小由矮的那个点决定,所以,先算出距离最长的两个点之间的面积。假设高的点b在最右端,这时如果把点b往左移动,面积是只可能变小,因为距离变小,而面积由矮的点...原创 2019-07-28 17:30:23 · 116 阅读 · 0 评论