摘要: Problem:Given a range [m, n] where 0 00111010101011...We can we reach the '1' in high index, all digits behind after it must change once. That's to s... 阅读全文
posted @ 2015-09-02 23:17 airforce 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Problem: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... 阅读全文
posted @ 2015-09-02 12:30 airforce 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Problem:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.Analysis:This problem is trivial, if... 阅读全文
posted @ 2015-09-02 11:33 airforce 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Problem:Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Analysis:This problem actually requi... 阅读全文
posted @ 2015-09-02 01:04 airforce 阅读(125) 评论(0) 推荐(0) 编辑