03 2020 档案

摘要:https://leetcode-cn.com/problems/trapping-rain-water/ 双指针解法。 1 public class Solution 2 { 3 public int Trap(int[] height) 4 { 5 int size = height.Lengt 阅读全文
posted @ 2020-03-31 18:42 Quintinz 阅读(172) 评论(0) 推荐(0) 编辑
摘要:https://leetcode-cn.com/problems/container-with-most-water/ 双指针解法。 需要理解最大面积 1 public class Solution 2 { 3 //双指针解法,首先要理解 4 public int MaxArea(int[] hei 阅读全文
posted @ 2020-03-31 18:40 Quintinz 阅读(157) 评论(0) 推荐(0) 编辑
摘要:https://leetcode-cn.com/problems/palindrome-number/ 虽然很简单,还是写一下题解吧。 思路1. 首先判断负数和个位数是0但x不等于0的一定不是回文。然后翻转字符串的一半,判断另一半时候和翻转后的相等。注意:121这种奇数位结构。 1 public c 阅读全文
posted @ 2020-03-30 05:17 Quintinz 阅读(225) 评论(0) 推荐(0) 编辑
摘要:10. 正则表达式匹配 给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。 '.' 匹配任意单个字符 '*' 匹配零个或多个前面的那一个元素 所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。 说明: s 可能为空,且只包含从 a-z 的小写字 阅读全文
posted @ 2020-03-06 20:07 Quintinz 阅读(240) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示