上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页
摘要: 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) 编辑
摘要: 536. Construct Binary Tree from String You need to construct a binary tree from a string consisting of parenthesis and integers. The whole input repre 阅读全文
posted @ 2017-03-12 22:22 HorseShoe2016 阅读(976) 评论(0) 推荐(0) 编辑
摘要: 527. Word Abbreviation Given an array of n distinct non empty strings, you need to generate minimal possible abbreviations for every word following ru 阅读全文
posted @ 2017-03-12 21:59 HorseShoe2016 阅读(733) 评论(0) 推荐(0) 编辑
摘要: 问题描述 Given a picture consisting of black and white pixels, and a positive integer N, find the number of black pixels located at some specific row R an 阅读全文
posted @ 2017-03-06 12:09 HorseShoe2016 阅读(676) 评论(0) 推荐(0) 编辑
摘要: 问题描述 In the video game Fallout 4, the quest "Road to Freedom" requires players to reach a metal dial called the "Freedom Trail Ring", and use the dial 阅读全文
posted @ 2017-03-06 11:30 HorseShoe2016 阅读(521) 评论(0) 推荐(0) 编辑
摘要: Lonely Pixel I 两种算法之间的性能比较 今天参加LeetCode Weekly Contest 22,第二题 "Lonely Pixel I" 问题描述如下: Given a picture consisting of black and white pixels, find the 阅读全文
posted @ 2017-03-05 19:59 HorseShoe2016 阅读(1179) 评论(0) 推荐(0) 编辑
摘要: 新建了一个Android Studio工程,在MainActivity的主界面中添加了两个按钮,点击其中一个按钮用来启动 NormalActivity,点击另一按钮用来启动DialogActivity. 其中,NormalActivity和DialogActivity都是很简单的界面,只是在Andr 阅读全文
posted @ 2017-02-27 21:03 HorseShoe2016 阅读(4883) 评论(1) 推荐(1) 编辑
摘要: 问题描述 You need to find the largest element in each row of a Binary Tree. Example: Input: 1 / \ 2 3 / \ \ 5 3 9 Output: [1, 3, 9] 算法分析 使用两个队列,逐层遍历二叉树的各个 阅读全文
posted @ 2017-02-12 15:54 HorseShoe2016 阅读(226) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页