It’s not on the LeetCode, but on the LintCode. LintCode link first thought Use DP, build a matrix dp to represent the maximum number with the substring of a ...
LeetCode link first thought DP. Using 1d array to record the maximum length of sequence of each number when the number is the last number in the sequence. Ge...
LeetCode link first thought use dp from top left add to bottom right. can be solved by using only a 1d array solution 123456789101112131415161718192021class...
关键点 确定好问题的变量及之间的关系 确定好问题的规模(即 new 一个几维的数组,每个维度代表什么) 确定好问题的初始情况(类似于DFS的base case) 确定好问题的表达式(类似于DFS的递归函数处的处理,如 fibonacci(n) = fibonacci(n-1)+fibonacci(n-2) 对应的...
管理进程间的安全通信。 主题 XPC 客户端(XPC Client)1protocol NSXPCProxyCreating 创建新的代理(proxy)对象的方法。 1class NSXPCConnection 两个进程间的双向通信通道。 1class NSXPCInterface 一个可以发送到导出对象(ex...
LeetCode link first thought have no idea… it can be also solved by dfs, but I think bfs cost less, so just use bfs. Have seen the answer. Because the problem...
LeetCode link first thought DFS DFS solution 123456789101112131415161718192021public class Solution { public List<Integer> largestValues(TreeN...
LeetCode link first thought DFS. solution1 1234567891011121314151617181920212223public class Solution { public List<Integer> rightSideView(Tre...
LeetCode link first thought BFS. Two queue to iterate, update the result when finish one level. solution 1234567891011121314151617181920212223class Solution...
LeetCode link first thought similar with surrounded problem, using bfs to search. solution 123456789101112131415161718192021222324252627282930313233343536cl...