上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 117 下一页
摘要: Given a binary tree and a linkedlist, check if there is a path or ... 阅读全文
posted @ 2020-11-18 12:02 EvanMeetTheWorld 阅读(19) 评论(0) 推荐(0)
摘要: Given a binary tree root, a ZigZag path for a binary tree is defin... 阅读全文
posted @ 2020-11-18 11:08 EvanMeetTheWorld 阅读(42) 评论(0) 推荐(0)
摘要: 经典LCA的变形题目 现在不是要求 你找任意给定的两个Node的LCA了 而是找最深leaves的LCA。 回想一下 之前解决这个问... 阅读全文
posted @ 2020-11-18 10:37 EvanMeetTheWorld 阅读(22) 评论(0) 推荐(0)
摘要: suppose the level of root is 1. now we need to return the smallest... 阅读全文
posted @ 2020-11-18 03:04 EvanMeetTheWorld 阅读(16) 评论(0) 推荐(0)
摘要: 树的width的定义是: 每一层的最左和最右之间的额所有Node的数量(包括null node) idea: 我们给每一层的节点赋值... 阅读全文
posted @ 2020-11-18 01:20 EvanMeetTheWorld 阅读(18) 评论(0) 推荐(0)
摘要: Given a binary tree, find the leftmost value in the last row of th... 阅读全文
posted @ 2020-11-17 11:53 EvanMeetTheWorld 阅读(22) 评论(0) 推荐(0)
摘要: LCA problem, a really classic one. so you must really understand t... 阅读全文
posted @ 2020-11-17 10:49 EvanMeetTheWorld 阅读(14) 评论(0) 推荐(0)
摘要: LinkedList stack = new LinkedList(); //push and popDeque stack = n... 阅读全文
posted @ 2020-11-17 10:15 EvanMeetTheWorld 阅读(30) 评论(0) 推荐(0)
摘要: still an easy question. cousins are in the same depth but with dif... 阅读全文
posted @ 2020-11-16 22:51 EvanMeetTheWorld 阅读(24) 评论(0) 推荐(0)
摘要: given a tree which each val of the nodes are positive. output the ... 阅读全文
posted @ 2020-11-16 22:29 EvanMeetTheWorld 阅读(23) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 117 下一页