1
1
using System ;
2
- using System . Collections ;
3
- using System . Collections . Generic ;
4
2
5
- public class CustomSet < T > : IEnumerable < T > , IEquatable < IEnumerable < T > >
3
+ public class CustomSet
6
4
{
7
- public CustomSet ( )
8
- {
9
- }
10
-
11
- public CustomSet ( T value )
12
- {
13
- }
14
-
15
- public CustomSet ( IEnumerable < T > values )
16
- {
17
- }
18
-
19
- public CustomSet < T > Insert ( T value )
20
- {
21
- throw new NotImplementedException ( "You need to implement this function." ) ;
22
- }
23
-
24
- public bool IsEmpty ( )
5
+ public CustomSet ( params int [ ] values )
25
6
{
26
7
throw new NotImplementedException ( "You need to implement this function." ) ;
27
8
}
28
9
29
- public bool Contains ( T value )
10
+ public CustomSet Insert ( int value )
30
11
{
31
12
throw new NotImplementedException ( "You need to implement this function." ) ;
32
13
}
33
14
34
- public bool IsSubsetOf ( CustomSet < T > right )
15
+ public bool Empty ( )
35
16
{
36
17
throw new NotImplementedException ( "You need to implement this function." ) ;
37
18
}
38
19
39
- public bool IsDisjointFrom ( CustomSet < T > right )
20
+ public bool Contains ( int value )
40
21
{
41
22
throw new NotImplementedException ( "You need to implement this function." ) ;
42
23
}
43
24
44
- public CustomSet < T > Intersection ( CustomSet < T > right )
25
+ public bool Subset ( CustomSet right )
45
26
{
46
27
throw new NotImplementedException ( "You need to implement this function." ) ;
47
28
}
48
29
49
- public CustomSet < T > Difference ( CustomSet < T > right )
30
+ public bool Disjoint ( CustomSet right )
50
31
{
51
32
throw new NotImplementedException ( "You need to implement this function." ) ;
52
33
}
53
34
54
- public CustomSet < T > Union ( CustomSet < T > right )
35
+ public CustomSet Intersection ( CustomSet right )
55
36
{
56
37
throw new NotImplementedException ( "You need to implement this function." ) ;
57
38
}
58
39
59
- public IEnumerator < T > GetEnumerator ( )
40
+ public CustomSet Difference ( CustomSet right )
60
41
{
61
42
throw new NotImplementedException ( "You need to implement this function." ) ;
62
43
}
63
44
64
- IEnumerator IEnumerable . GetEnumerator ( )
45
+ public CustomSet Union ( CustomSet right )
65
46
{
66
47
throw new NotImplementedException ( "You need to implement this function." ) ;
67
48
}
68
-
69
- public override bool Equals ( object obj )
70
- {
71
- throw new NotImplementedException ( "You need to implement this function." ) ;
72
- }
73
-
74
- public override int GetHashCode ( )
75
- {
76
- throw new NotImplementedException ( ) ;
77
- }
78
-
79
- public bool Equals ( IEnumerable < T > other )
80
- {
81
- throw new NotImplementedException ( "You need to implement this function." ) ;
82
- }
83
-
84
- public int GetHashCode ( IEnumerable < T > obj )
85
- {
86
- throw new NotImplementedException ( ) ;
87
- }
88
49
}
0 commit comments