会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
jasoncool1
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
14
15
16
17
18
19
20
21
22
下一页
2018年8月30日
226. Invert Binary Tree (Tree)
摘要: easy
阅读全文
posted @ 2018-08-30 12:08 jasoncool1
阅读(104)
评论(0)
推荐(0)
2018年8月28日
100. Same Tree (Tree)
摘要: 注意null的时候要单独判断 因为不能用val
阅读全文
posted @ 2018-08-28 22:16 jasoncool1
阅读(155)
评论(0)
推荐(0)
104. Maximum Depth of Binary Tree (Tree)
摘要: easy
阅读全文
posted @ 2018-08-28 22:01 jasoncool1
阅读(99)
评论(0)
推荐(0)
647. Palindromic Substrings
摘要: 没啥特别 会longest palindromic substrings就可以
阅读全文
posted @ 2018-08-28 21:39 jasoncool1
阅读(146)
评论(0)
推荐(0)
5. Longest Palindromic Substring
摘要: 把每个位置分成odd和even两种情况 两个指针分别向两边查找,看看最长的palindrome在哪里 这样复杂度比较低 全部遍历的话 timelimit exceed
阅读全文
posted @ 2018-08-28 21:05 jasoncool1
阅读(105)
评论(0)
推荐(0)
20. Valid Parentheses
摘要: 用stack
阅读全文
posted @ 2018-08-28 07:43 jasoncool1
阅读(179)
评论(0)
推荐(0)
242. Valid Anagram
摘要: 1 //easy 2 //注意字符串长度可能不一样 3 4 class Solution { 5 public boolean isAnagram(String s, String t) { 6 if(s.length() != t.length()) return false; 7 char[] arr1 = s.toCharArray(...
阅读全文
posted @ 2018-08-28 06:48 jasoncool1
阅读(104)
评论(0)
推荐(0)
3. Longest Substring Without Repeating Characters
摘要: 自己方法复杂度比较高 可以O(n)的方法,遍历一遍 用两个指针记录maxstring的位置 然后遇到跟hashmap里重复的就更新指针https://leetcode.com/problems/longest-substring-without-repeating-characters/discus
阅读全文
posted @ 2018-08-28 06:37 jasoncool1
阅读(127)
评论(0)
推荐(0)
90. Subsets II (sets)
摘要: 同Subset就是要先进行排序,backtrack的时候不要把重复的加入list
阅读全文
posted @ 2018-08-28 01:27 jasoncool1
阅读(124)
评论(0)
推荐(0)
78. Subsets (sets)
摘要: backtrack的思想https://blog.csdn.net/wonner_/article/details/80373871这个链接很好 subset中的backtrack要把最后一个param设置成现在进行遍历的位置,而且backtrack中的循环要在上一个position之后开始
阅读全文
posted @ 2018-08-28 01:14 jasoncool1
阅读(157)
评论(0)
推荐(0)
上一页
1
···
14
15
16
17
18
19
20
21
22
下一页
公告