added new exo

This commit is contained in:
didier amyot committed 2023-08-21 10:06:31 -04:00
1 parent c17800f71a
commit 22c72c3c8d
2 files changed
+40 -4

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
namespace Algorithms;
public class IntChainLink
{
private int value;
private IntChainLink? lst;
public IntChainLink(int value)
{
this.value = value;
this.lst = null;
}
public IntChainLink(int value, IntChainLink lst)
{
this.value = value;
this.lst = lst;
}
public int Head()
{
return value;
}
public IntChainLink Rest()
{
return lst!;
}
}