08 2016 档案

摘要:策略模式(Strategy Pattern) 抛开晦涩的定义,首先看一个例子: 我们想要创建一个模拟鸭子的游戏,在这个游戏中,会有各种类型的鸭子,比如mallard duck,red head duck,rubber duck(除了rubber duck(橡皮鸭),看见这其余两种鸭子很好奇,于是查找 阅读全文
posted @ 2016-08-13 14:59 U_F_O 阅读(648) 评论(0) 推荐(0) 编辑
摘要:According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John 阅读全文
posted @ 2016-08-11 13:30 U_F_O 阅读(310) 评论(0) 推荐(0) 编辑
摘要:Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. 阅读全文
posted @ 2016-08-09 20:23 U_F_O 阅读(169) 评论(0) 推荐(0) 编辑