会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
THE WAY I AM
博客园
首页
新随笔
联系
管理
订阅
上一页
1
2
3
4
5
6
7
下一页
2019年4月10日
322. Coin Change零钱兑换
摘要: 网址:https://leetcode.com/problems/coin-change/ 典型的动态规划问题,类比背包问题,这就是完全背包问题
阅读全文
posted @ 2019-04-10 20:06 549
阅读(133)
评论(0)
推荐(0)
2019年4月9日
43. Multiply Strings字符串相乘
摘要: 网址:https://leetcode.com/problems/multiply-strings/submissions/ 参考:https://leetcode.com/problems/multiply-strings/discuss/17605/Easiest-JAVA-Solution-w
阅读全文
posted @ 2019-04-09 20:32 549
阅读(119)
评论(0)
推荐(0)
977. Squares of a Sorted Array有序数组的平方
摘要: 网址:https://leetcode.com/problems/squares-of-a-sorted-array/ 双指针法 把左端的元素和右端的元素比较后挑出绝对值大的,将其平方放入ans中,并且将指针往中间移动 不断循环上述过程,直至两指针重合。注意处理重合位置 最后将 ans 通过 rev
阅读全文
posted @ 2019-04-09 18:37 549
阅读(94)
评论(0)
推荐(0)
2019年4月8日
1018. Binary Prefix Divisible By 5可被 5 整除的二进制前缀
摘要: 网址:https://leetcode.com/problems/binary-prefix-divisible-by-5/ 一次for循环遍历数组,在上次计算的基础上得到本次的结果!
阅读全文
posted @ 2019-04-08 14:21 549
阅读(177)
评论(0)
推荐(0)
1021. Remove Outermost Parentheses删除最外层的括号
摘要: 网址:https://leetcode.com/problems/remove-outermost-parentheses/ 使用栈的思想,选择合适的判断时机 删除最外层的括号
阅读全文
posted @ 2019-04-08 10:15 549
阅读(245)
评论(0)
推荐(0)
1022. Sum of Root To Leaf Binary Numbers从根到叶的二进制数之和
摘要: 网址:https://leetcode.com/problems/sum-of-root-to-leaf-binary-numbers/ 递归调用求和,同时注意%1000000007的位置
阅读全文
posted @ 2019-04-08 10:14 549
阅读(240)
评论(0)
推荐(0)
1023. Camelcase Matching驼峰式匹配
摘要: 网址:https://leetcode.com/problems/camelcase-matching/ 依题意可得逻辑
阅读全文
posted @ 2019-04-08 10:09 549
阅读(274)
评论(0)
推荐(0)
2019年4月4日
3. Longest Substring Without Repeating Characters无重复字符的最长子串
摘要: 网址:https://leetcode.com/problems/longest-substring-without-repeating-characters/ 显然采用sliding window滑动窗口法,辅助以哈希表,判断字符是否已使用 不断扩充 j,直到 s[j] 已经使用 此时,把 i 移
阅读全文
posted @ 2019-04-04 21:14 549
阅读(98)
评论(0)
推荐(0)
946. Validate Stack Sequences验证栈序列
摘要: 网址:https://leetcode.com/problems/validate-stack-sequences/ 参考:https://leetcode.com/problems/validate-stack-sequences/discuss/197667/Java-straight-forw
阅读全文
posted @ 2019-04-04 00:12 549
阅读(182)
评论(0)
推荐(0)
2019年4月2日
238. Product of Array Except Self除自身以外数组的乘积
摘要: 网址:https://leetcode.com/problems/product-of-array-except-self/ 参考:https://leetcode.com/problems/product-of-array-except-self/discuss/65622/Simple-Java
阅读全文
posted @ 2019-04-02 14:33 549
阅读(94)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页