-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetADT.h
More file actions
33 lines (25 loc) · 801 Bytes
/
Copy pathsetADT.h
File metadata and controls
33 lines (25 loc) · 801 Bytes
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
/*
GROUP NUMBER: 5
MEMBERS:
1. HRISHIKESH HARSH (2020A7PS0313P)
2. HARSH PRIYADARSHI (2020A7PS0110P)
3. ANTRIKSH SHARMA (2020A7PS1691P)
4. KAUSTAB CHOUDHURY (2020A7PS0013P)
5. SHASHANK SHREEDHAR BHATT (2020A7PS0078P)
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "commons.h"
typedef struct set
{
int* array; // This is an array of bits, whereby 0 represents the absence of an element and 1 represents its presence
int size; // Number of elements that are in the set
} Set;
int isInSet(Set* s, int x) ;
void insertIntoSet(Set* s, int x);
void removeFromSet(Set* s, int x);
Set* createIntersection(Set* s1, Set* s2);
Set* createUnion(Set* s1, Set* s2);
void printSet(Set* s);