-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathADS.cs
55 lines (43 loc) · 1.02 KB
/
ADS.cs
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
51
52
53
54
55
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ADS
{
public enum TraverseOrder
{
InOrder,
PreOrder,
PostOrder
}
public class ADSTree
{
private ADSNode root;
public sealed class ADSNode
{
public ADSNode left;
public ADSNode right;
public int key;
public int cardinality; // Increment each time duplicates are added
public int height; // Height of this node
}
public ADSTree()
{
root = null;
}
// Return the node where value is located
public ADSNode find(int value)
{
return null;
}
// Inserts a node into the tree and maintains it's balance
public void insert(int value)
{
}
// Print the tree in a particular order
public void printTree(TraverseOrder order)
{
}
}
}