软件的本质与软件工程科学
1.简答题
软件工程的定义:
软件工程是应用系统的、规范的、量化的方法来开发、操作和维护软件,是将工程应用到软件开发的系统方法。
算法project报告
Suppose there are n facilities and m customers. We wish to choose:
The objective is to minimize the sum of the opening cost and the assignment cost.
The total demand assigned to a facility must not exceed its capacity.
You need to obtain the results for 71 benchmark instances.
最近在复习贪心算法,复习到了并查集这个数据结构,因此写一道用并查集来解决的算法题。
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
Your algorithm should run in O(n) complexity.
Example:
1
2
3
4 > Input: [100, 4, 200, 1, 3, 2]
> Output: 4
> Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.
>