
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50


목차
1주 - Real Number Representation
2주 - Magic Square
3주 - Basic Recursion
4주 - Recursion
5주 - Sorting Performance analysis
6주 - Exercising Array
7주 - Evaluation of Expression
8주 - Circular Queue & Maze
9주 - Stack & Queue using Linked list
10주 - Equivalenece Class
11주 - Binary Search Tree
12주 - Priority Queue
13주 - Selection Tree
14주 - Union-Find Algorithm
2주 - Magic Square
3주 - Basic Recursion
4주 - Recursion
5주 - Sorting Performance analysis
6주 - Exercising Array
7주 - Evaluation of Expression
8주 - Circular Queue & Maze
9주 - Stack & Queue using Linked list
10주 - Equivalenece Class
11주 - Binary Search Tree
12주 - Priority Queue
13주 - Selection Tree
14주 - Union-Find Algorithm
본문내용
#include
#include
#define MAX_SIZE 100// Array의최대크기
using namespace std;
//DisjointSets의클래스
class DisjointSets
{
private:
int Parent[MAX_SIZE];// DisjointSets을표현할Array
int Size; // Array size : Array의size를입력받는다.
public:
DisjointSets(int size); //생성자, size를입력받아멤버변수Size를갱신, Parent배열을초기화한다.
bool unionSets(int set1, int set2);// union
int findSet(int element);// find
void printSets();// Array 출력
};
#include
#define MAX_SIZE 100// Array의최대크기
using namespace std;
//DisjointSets의클래스
class DisjointSets
{
private:
int Parent[MAX_SIZE];// DisjointSets을표현할Array
int Size; // Array size : Array의size를입력받는다.
public:
DisjointSets(int size); //생성자, size를입력받아멤버변수Size를갱신, Parent배열을초기화한다.
bool unionSets(int set1, int set2);// union
int findSet(int element);// find
void printSets();// Array 출력
};
소개글