Separeted Generic Nodes (Directed and Undirected)

This commit is contained in:
2022-04-02 21:22:20 +01:00
parent e5fa390608
commit 78df73e66d
6 changed files with 20 additions and 5 deletions

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace C_.Datastructures.Generic
{
internal class DirectedNode<T, NodeType>
{
public T? Value { get; set; } = default;
public NodeType? Left { get; set; } = default;
public NodeType? Right { get; set; } = default;
}
}

View File

@ -1,6 +1,6 @@
namespace C_.Datastructures.Generic
{
internal class Node<T, NodeType>
internal class UndirectedNode<T, NodeType>
{//Generic Node type that every other type inherits from
public T? Value { get; set; } = default;
public NodeType? Next { get; set; } = default;