2015年3月27日

Interleaving String

摘要: Interleaving String问题:Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.思路: dfs肯定能解决 但是肯定会超时 动态规划方程dp[i][j] == true only dp[i-1][... 阅读全文

posted @ 2015-03-27 23:10 zhouzhou0615 阅读(170) 评论(0) 推荐(0) 编辑

设计模式开始--生成器模式

摘要: 生成器模式设计模式的原则:尽量暴漏在主程序里面的代码扩展性强一些,多用接口和虚拟类,少用实现类,这样再改程序的时候就方便的多了。1、作用:一个Product类的产生需要多个其他的类Unit顺序生成之后组合而成,而且这些Unit的产生方法是不固定的。举例而言一个对象会有一些重要的性质,在它们没有恰当的... 阅读全文

posted @ 2015-03-27 22:29 zhouzhou0615 阅读(191) 评论(0) 推荐(0) 编辑

Fraction to Recurring Decimal

摘要: Fraction to Recurring Decimal问题:Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If t... 阅读全文

posted @ 2015-03-27 15:31 zhouzhou0615 阅读(160) 评论(0) 推荐(0) 编辑

导航