FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
AlgorithmSamples/BinaryTreeCommon/ISortableNode.cs at master · grinka/AlgorithmSamples · GitHub
grinka
/
AlgorithmSamples
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
AlgorithmSamples
/
BinaryTreeCommon
/
ISortableNode.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 1.1 KB
Breadcrumbs
AlgorithmSamples
/
BinaryTreeCommon
/
ISortableNode.cs
Copy path
File metadata and controls
33 lines (29 loc) · 1.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
namespace
AlgorithmSamples
.
BinaryTree
.
Common
{
/// <summary>
/// Node to be used with sorting binary tree.
/// </summary>
/// <typeparam name="T">Type of the object to be stored with the node.</typeparam>
public
interface
ISortableNode
<
T
>
{
/// <summary>
/// Sort the node and it's child in ascending order. Return the result in one-dimensional array.
/// </summary>
T
[
]
SortedAscending
{
get
;
}
/// <summary>
/// Sort the node and it's child in descending order. Return the result in one-dimensional array.
/// </summary>
T
[
]
SortedDescending
{
get
;
}
/// <summary>
/// Add the value to the corresponding node child.
/// </summary>
/// <param name="value"></param>
void
AddValue
(
T
value
)
;
/// <summary>
/// Gets the Node size - quantity of the node's descendants.
/// </summary>
int
Size
{
get
;
}
/// <summary>
/// Gets the flag indicating whatever node is empty - has no descendants.
/// </summary>
bool
IsEmpty
{
get
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL