随笔 - 173  文章 - 1  评论 - 26  阅读 - 43万
03 2017 档案
hihocoder 1014----Trie树
摘要:hihocoder 1014: Trie树 原题链接: "http://hihocoder.com/problemset/problem/1014" 算法分析 解决该题需要构造一个Trie类,用来对输入的每一个字符串进行统计。 该Trie类每个实例表示一个Trie树的节点,每个节点有26个“槽”,表 阅读全文
posted @ 2017-03-28 21:39 HorseShoe2016 阅读(285) 评论(0) 推荐(0) 编辑
hihocoder 1485----hiho字符串
摘要:hihocoder 1485:hiho字符串 描述如果一个字符串恰好包含2个& 39;h& 39;、1个& 39;i& 39;和1个& 39;o& 39;,我们就称这个字符串是hiho字符串。  例如"oihateher"、"hugeinputhugeoutp 阅读全文
posted @ 2017-03-27 12:30 HorseShoe2016 阅读(629) 评论(0) 推荐(0) 编辑
LeetCode 545----Boundary of Binary Tree
摘要:Given a binary tree, return the values of its boundary in anti clockwise direction starting from root. Boundary includes left boundary, leaves, and ri 阅读全文
posted @ 2017-03-26 12:00 HorseShoe2016 阅读(1132) 评论(0) 推荐(0) 编辑
LeetCode 544----Output Contest Matches
摘要: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 阅读(455) 评论(0) 推荐(0) 编辑
LeetCode 542----01 Matrix
摘要: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 阅读(368) 评论(0) 推荐(0) 编辑
LeetCode 538----Convert BST to Greater Tree
摘要: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 阅读(886) 评论(0) 推荐(0) 编辑
LeetCode 543---- Diameter of Binary Tree
摘要: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 阅读(668) 评论(0) 推荐(0) 编辑
LeetCode 536----Construct Binary Tree from String
摘要: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 阅读(977) 评论(0) 推荐(0) 编辑
LeetCode 527---Word Abbreviation
摘要: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 阅读(740) 评论(0) 推荐(0) 编辑
LeetCode 533----Lonely Pixel II
摘要:问题描述 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 阅读(681) 评论(0) 推荐(0) 编辑
LeetCode 514----Freedom Trail
摘要:问题描述 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 阅读(524) 评论(0) 推荐(0) 编辑
LeetCode 531----Lonely Pixel I----两种算法之间性能的比较
摘要: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 阅读(1188) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示