摘要: During the NBA playoffs, we always arrange the rather strong team to play with the rather weak team, like make the rank 1 team play with the rank nth 阅读全文
posted @ 2017-03-19 11:17 HorseShoe2016 阅读(449) 评论(0) 推荐(0) 编辑
摘要: Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2017-03-19 11:07 HorseShoe2016 阅读(366) 评论(0) 推荐(0) 编辑
摘要: Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2017-03-19 11:01 HorseShoe2016 阅读(878) 评论(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 @ 2017-03-19 10:58 HorseShoe2016 阅读(665) 评论(0) 推荐(0) 编辑