摘要: Write a function to generate the generalized abbreviations of a word. Example: Given word = "word", return the following list (order does not matter): 阅读全文
posted @ 2017-11-26 15:28 jxr041100 阅读(125) 评论(0) 推荐(0) 编辑
摘要: A string such as "word" contains the following abbreviations: ["word", "1ord", "w1rd", "wo1d", "wor1", "2rd", "w2d", "wo2", "1o1d", "1or1", "w1r1", "1 阅读全文
posted @ 2017-11-26 15:23 jxr041100 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, count the number of uni-value subtrees. A Uni-value subtree means all nodes of the subtree have the same value. For example:Given 阅读全文
posted @ 2017-11-26 15:18 jxr041100 阅读(183) 评论(0) 推荐(0) 编辑
摘要: An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one bla 阅读全文
posted @ 2017-11-26 15:11 jxr041100 阅读(149) 评论(0) 推荐(0) 编辑