Updated Linked List Node Interface
This commit is contained in:
parent
00f52ee5c7
commit
fffce6c6bb
@ -5,9 +5,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
public interface INode<T>
|
||||
public interface ILinkedListNode<T>
|
||||
{
|
||||
public T? Value { get; set; }
|
||||
public INode<T>? Next { get; set; }
|
||||
public ILinkedListNode<T>? Next { get; set; }
|
||||
}
|
||||
}
|
@ -6,10 +6,10 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace C_.Datastructures.Nodes
|
||||
{
|
||||
internal class LinkedListNode<T> : INode<T>
|
||||
internal class LinkedListNode<T> : ILinkedListNode<T>
|
||||
{
|
||||
public T? Value { get; set; } = default;
|
||||
public INode<T>? Next { get; set; } = default(LinkedListNode<T>);
|
||||
public ILinkedListNode<T>? Next { get; set; } = default(LinkedListNode<T>);
|
||||
|
||||
public static LinkedListNode<T> Create(T? value, LinkedListNode<T>? next)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user