上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 77 下一页
摘要: [抄题]: We are given a binary tree (with root node root), a target node, and an integer value K. Return a list of the values of all nodes that have a di 阅读全文
posted @ 2018-09-06 08:38 苗妙苗 阅读(162) 评论(0) 推荐(0)
摘要: [抄题]: You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there exist 阅读全文
posted @ 2018-09-06 05:35 苗妙苗 阅读(396) 评论(0) 推荐(0)
摘要: [抄题]: Given a binary tree where every node has a unique value, and a target key k, find the value of the nearest leaf node to target k in the tree. He 阅读全文
posted @ 2018-09-05 23:08 苗妙苗 阅读(366) 评论(0) 推荐(0)
摘要: [抄题]: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Example: [暴力解法]: 时间分析: 空间分析: [优化后]: 时间分析: 空 阅读全文
posted @ 2018-09-05 04:56 苗妙苗 阅读(257) 评论(0) 推荐(0)
摘要: 一道题根本不会,抄答案过了。一道自己写,莫名其妙出现了不会的bug。最后交了暴力解,过了5/7。估计要跪。 总结: 缺点:做过的不熟练。没做过的题不会。一个陌生的小bug也de不出来。 措施:多总结还是有好处的。坚持刷tag题有必要,绝对能慢慢增强实力,很重要。 指定方向的dp: 改变i - 1 j 阅读全文
posted @ 2018-08-31 23:22 苗妙苗 阅读(1478) 评论(0) 推荐(0)
摘要: [抄题]: Given a string S of digits, such as S = "123456579", we can split it into a Fibonacci-like sequence [123, 456, 579]. Formally, a Fibonacci-like 阅读全文
posted @ 2018-08-28 20:46 苗妙苗 阅读(400) 评论(0) 推荐(0)
摘要: [抄题]: Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The 阅读全文
posted @ 2018-08-28 04:33 苗妙苗 阅读(529) 评论(0) 推荐(0)
摘要: [抄题]: We have some permutation A of [0, 1, ..., N - 1], where N is the length of A. The number of (global) inversions is the number of i < j with 0 <= 阅读全文
posted @ 2018-08-28 04:19 苗妙苗 阅读(227) 评论(0) 推荐(0)
摘要: [抄题]: Given a non-negative integer N, find the largest number that is less than or equal to N with monotone increasing digits. (Recall that an integer 阅读全文
posted @ 2018-08-27 08:07 苗妙苗 阅读(328) 评论(0) 推荐(0)
摘要: [抄题]: Given a Binary Search Tree (BST) with root node root, and a target value V, split the tree into two subtrees where one subtree has nodes that ar 阅读全文
posted @ 2018-08-24 09:35 苗妙苗 阅读(753) 评论(0) 推荐(0)
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 77 下一页