Created Linked List (incomplete)

This commit is contained in:
2022-03-03 10:12:42 +00:00
parent bad7445c9b
commit 8945da2569
2 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace C_.Datastructures.Nodes
{
public interface iNode<T>
{
public T? Value { get; set; }
public iNode<T>? Next { get; set; }
}
public class Node<T> : iNode<T>{
public T? Value { get; set; } = default(T);
public iNode<T>? Next { get; set; } = default(Node<T>);
public static Node<T> Create(T? value, Node<T>? next){
return new Node<T>{
Value = value,
Next = next
};
}
}
}