鱼儿慢慢游~~

导航

 

2016年6月21日

摘要: 题目描述: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its 阅读全文
posted @ 2016-06-21 18:41 miss_UU 阅读(188) 评论(0) 推荐(0) 编辑
 

2016年6月20日

摘要: 意图:为其他对象提供一种代理以控制对这个对象的访问。 适用性: 1. 远程代理:为一个对象在不同的地址空间提供局部代表。 (ps: 这点不理解) 2. 虚代理: 根据需要创建开销很大的对象。 如在打开一篇文档时,如果文档中有很大的图片,在一开始的时候,并不需要加载该图片,只有当视图切换下去时,图片才 阅读全文
posted @ 2016-06-20 20:07 miss_UU 阅读(212) 评论(0) 推荐(0) 编辑
 

2016年6月17日

摘要: 先看一个例子: (来自大话设计模式) 设计模式比较晦涩难懂, 个人感觉大话设计模式上的例子比较切近实际, 可以结合大话设计模式和gof一起看. 例子: 一个给人装饰衣物的系统, 类似qq秀的展示,可以有不同的穿衣风格.如 穿裤衩, 西装,打领带,皮靴,运动鞋等,不同风格的组合. 如果定义人的子类的话 阅读全文
posted @ 2016-06-17 15:58 miss_UU 阅读(242) 评论(0) 推荐(0) 编辑
 

2016年6月15日

摘要: 题目描述: Given an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 101, 18], The lon 阅读全文
posted @ 2016-06-15 14:38 miss_UU 阅读(167) 评论(0) 推荐(0) 编辑
 

2016年6月14日

摘要: 题目描述: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,- 阅读全文
posted @ 2016-06-14 16:57 miss_UU 阅读(159) 评论(0) 推荐(0) 编辑
 

2016年6月6日

摘要: 题目描述: One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null 阅读全文
posted @ 2016-06-06 16:52 miss_UU 阅读(166) 评论(0) 推荐(0) 编辑
 
摘要: 描述: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example, If n = 4 and k = 2, a solution is: 运行结果: [[ 阅读全文
posted @ 2016-06-06 10:53 miss_UU 阅读(204) 评论(0) 推荐(0) 编辑
 

2016年6月2日

摘要: 题目描述: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ 阅读全文
posted @ 2016-06-02 11:14 miss_UU 阅读(193) 评论(0) 推荐(0) 编辑
 
摘要: 题目描述: Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operato 阅读全文
posted @ 2016-06-02 10:34 miss_UU 阅读(244) 评论(0) 推荐(0) 编辑
 

2016年5月26日

摘要: 题目描述: Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, return [3,2,1]. 即 给定一颗二叉树。 使 阅读全文
posted @ 2016-05-26 17:47 miss_UU 阅读(152) 评论(0) 推荐(0) 编辑