刚刚学习UML时对面向对象设计有初步大概的了解,于是乎小小的总结了篇
面向对象概述,现在学完C#,面向对象分析有一进一步的理解,拿出来分享一下。
_________________理解有限,错误不足处请指点。
C#语言是一种现代、面向对象的语言。面向对象程序设计方法提出了一个全新的概念:类,它的主要思想是将数据(数据成员)及处理这些数据的相应...
分类:
其他好文 时间:
2014-06-01 15:55:44
阅读次数:
319
【题目】
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\ / / / \ 3 2 1 ...
分类:
其他好文 时间:
2014-06-01 15:34:24
阅读次数:
231
【题目】
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 3 2 1
\ / / / \ ...
分类:
其他好文 时间:
2014-06-01 15:33:45
阅读次数:
297
【题目】
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n = 4,
return 1->4->3->2->5->NULL.
Note:
Given m, n satisfy the following condition:
1 ≤ m ≤ n ≤ length of list.
【题意】
...
分类:
其他好文 时间:
2014-06-01 15:08:34
阅读次数:
237
问题:
Given a collection of numbers, return all possible permutations.
For example,
[1,2,3] have the following permutations:
[1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],
and [3,2,1].
分析:
...
分类:
其他好文 时间:
2014-06-01 15:04:42
阅读次数:
259
以前看细说PHP的时候就想做这个,但是一直没什么...
分类:
Web程序 时间:
2014-06-01 14:59:35
阅读次数:
246
上篇说到通过result.class.php来分流,由于三个类都继承了shape这个类,让我们来看一下,面向对象中的继承。
shape.class.shape文件
<?php
abstract class shape{
public $shapeName;
abstract function area();
ab...
分类:
其他好文 时间:
2014-06-01 13:05:53
阅读次数:
273
问题:
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1],
and...
分类:
其他好文 时间:
2014-06-01 13:03:12
阅读次数:
324
【题目】
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
For example:
Given "25525511135",
return ["255.255.11.135", "255.255.111.35"]. (Order does not matter)
【题意】
给定一个字符串,恢复并返回所有符合条件的IP串
【思路】...
分类:
其他好文 时间:
2014-06-01 13:01:56
阅读次数:
295
【题目】
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Recursive solution is trivial, could you do it iteratively?
confused what "{1,#,2...
分类:
其他好文 时间:
2014-06-01 13:01:23
阅读次数:
279