上一页 1 2 3 4 5 6 7 8 9 ··· 46 下一页
  2018年3月1日
摘要: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
posted @ 2018-03-01 09:41 Beserious 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non negative values, find the minimum absolute difference between values of any two nodes. 题目大意,求bst树任意两点的最小绝对距离。 思路,中 阅读全文
posted @ 2018-03-01 09:34 Beserious 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path betwe 阅读全文
posted @ 2018-03-01 09:28 Beserious 阅读(93) 评论(0) 推荐(0) 编辑
摘要: You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : L 阅读全文
posted @ 2018-03-01 09:14 Beserious 阅读(116) 评论(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 @ 2018-03-01 09:12 Beserious 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given an m n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each operation is represen 阅读全文
posted @ 2018-03-01 09:09 Beserious 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h 阅读全文
posted @ 2018-03-01 09:05 Beserious 阅读(93) 评论(0) 推荐(0) 编辑
摘要: You need to construct a string consists of parenthesis and integers from a binary tree with the preorder traversing way. The null node needs to be rep 阅读全文
posted @ 2018-03-01 08:59 Beserious 阅读(99) 评论(0) 推荐(0) 编辑
摘要: You are given a data structure of employee information, which includes the employee's unique id, his importance value and his direct subordinates' id. 阅读全文
posted @ 2018-03-01 08:53 Beserious 阅读(112) 评论(0) 推荐(0) 编辑
  2018年2月28日
摘要: Find the sum of all left leaves in a given binary tree. 思路:在递归的时候访问左右节点记录一下,比如做节点标记1,右节点标2,那么当遍历到叶子节点的时候,我们只加标记为1的叶子节点的值。 阅读全文
posted @ 2018-02-28 19:39 Beserious 阅读(51) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 46 下一页