摘要: 设计模式实际是一代代代码人的经验总结。它会教你怎样让最初写好的代码更好维护,更少因为后期需求而改变。 There should never be more than one reason for a class to change. 这是单一职责原则(SRP)的定义。即,有且仅有一个原因会引起类的变 阅读全文
posted @ 2017-01-04 14:47 Evermaple 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 问题描述:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".解题思路:先利用split()方法将句子按空格分为... 阅读全文
posted @ 2014-08-16 10:25 Evermaple 阅读(96) 评论(0) 推荐(0) 编辑