摘要: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1即反转二叉树,代码如下:/** * Definition for a bina... 阅读全文
posted @ 2015-06-16 11:30 小金乌会发光-Z&M 阅读(440) 评论(0) 推荐(0) 编辑
摘要: Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 ... 阅读全文
posted @ 2015-06-14 22:57 小金乌会发光-Z&M 阅读(212) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
posted @ 2015-06-12 21:01 小金乌会发光-Z&M 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1、方便获取图标的网站: http://www.easyicon.cn/ 2、百度网盘搜索引擎: http://www.pan1234.com/ 3、鸡啄米:C++编程入门系列之目录和总结: http://www.jizhuomi.com/software/129.html 4、牛客网:http:/ 阅读全文
posted @ 2015-06-12 16:07 小金乌会发光-Z&M 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ... 阅读全文
posted @ 2015-06-11 14:18 小金乌会发光-Z&M 阅读(271) 评论(0) 推荐(0) 编辑
摘要: 要求:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive inte... 阅读全文
posted @ 2015-06-10 16:29 小金乌会发光-Z&M 阅读(255) 评论(0) 推荐(0) 编辑
摘要: PHP经典面试题:(不断跟进补充中。。。)1、用PHP打印出前一天的时间格式是2009-02-1022:21:21(2分)echodate('Y-m-dH:i:s',strtotime('-1day'));或者$yesterday=time()-(24*60*60);echo'today:'.dat... 阅读全文
posted @ 2015-06-09 20:11 小金乌会发光-Z&M 阅读(454) 评论(0) 推荐(0) 编辑
摘要: Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega... 阅读全文
posted @ 2015-06-09 13:34 小金乌会发光-Z&M 阅读(206) 评论(0) 推荐(0) 编辑
摘要: Description:Count the number of prime numbers less than a non-negative number,n.本题给定一个非负数n,让我们求小于n的质数的个数,解题方法就在第二个提示埃拉托斯特尼筛法Sieve of Eratosthenes中,这个算... 阅读全文
posted @ 2015-06-08 21:11 小金乌会发光-Z&M 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases.Notes:It is intended for this problem to be specified ... 阅读全文
posted @ 2015-06-06 20:38 小金乌会发光-Z&M 阅读(260) 评论(0) 推荐(0) 编辑