上一页 1 2 3 4 5 6 7 8 9 ··· 36 下一页
摘要: Note: The lower one can cross other higher recetangle. Thus height[j] <= height[left/ right -/+ 1] 阅读全文
posted @ 2017-09-04 15:18 keepshuatishuati 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Brute Force: has '*' before find last index of s and p when star found, s move forward char s not reaches end -- > p reaches end | no star NOT MATCH | 阅读全文
posted @ 2017-09-04 14:49 keepshuatishuati 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Note: 1. There is a trick here: As it only gets the starting point, we can check each bound of the building. Also we have to have a "sign" to know whe 阅读全文
posted @ 2017-09-04 14:04 keepshuatishuati 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Note: 1. When real index is 0. It will be only add as first element without any opeartors. 2. When the starting char of one layer is '0', it should br 阅读全文
posted @ 2017-09-04 13:41 keepshuatishuati 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Note: It could be other chars in the String. Do not count as invalid parenthesis. Second try: 1. Count j until i. not exceed i. 2. Return after remove 阅读全文
posted @ 2017-09-04 07:49 keepshuatishuati 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Note: 1. Scan from the small level. 2. Only take the index larger one if same digits. 阅读全文
posted @ 2017-09-04 07:20 keepshuatishuati 阅读(273) 评论(0) 推荐(0) 编辑
摘要: class Solution { public String convertToTitle(int n) { if (n 0) { result.insert(0, (char)('A' + n % 26)); n /= 26; } return result.toString(); ... 阅读全文
posted @ 2017-09-03 16:42 keepshuatishuati 阅读(102) 评论(0) 推荐(0) 编辑
摘要: Notes: For sorted array, there are two properties we can use: 1. All duplicates are stay togethers (First solution) 2. Ascending order (Second solutio 阅读全文
posted @ 2017-09-03 16:37 keepshuatishuati 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Notes: 1. Still need to pay attention that return start since start represents current index to place next int. 2. define start outside of loop. 阅读全文
posted @ 2017-09-03 16:28 keepshuatishuati 阅读(77) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { pub... 阅读全文
posted @ 2017-09-03 16:23 keepshuatishuati 阅读(80) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 36 下一页