摘要: Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 阅读全文
posted @ 2017-07-15 21:19 immjc 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-07-15 17:19 immjc 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Note: There are at 阅读全文
posted @ 2017-07-15 16:42 immjc 阅读(132) 评论(0) 推荐(0) 编辑
摘要: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans 阅读全文
posted @ 2017-07-15 16:14 immjc 阅读(204) 评论(0) 推荐(0) 编辑