fånga alla

This commit is contained in:
2018-12-23 18:59:54 +01:00
parent 55e4e202c8
commit abaaf01763

View File

@ -34,8 +34,11 @@ namespace _2018_08
private int CalculateMetaData(int[] numbers) private int CalculateMetaData(int[] numbers)
{ {
int tempSum = 0; int tempSum = 0;
int omgStart = 0;
LinkedList<TreeNode> llT = new LinkedList<TreeNode>(); LinkedList<TreeNode> llT = new LinkedList<TreeNode>();
TreeNode strtNode = new TreeNode(0, numbers); while (omgStart < numbers.Length)
{
TreeNode strtNode = new TreeNode(omgStart, numbers);
llT.AddLast(strtNode); llT.AddLast(strtNode);
int headEnd = 0; int headEnd = 0;
int firstAnt = strtNode.AntChilds; int firstAnt = strtNode.AntChilds;
@ -51,8 +54,10 @@ namespace _2018_08
//llT.AddLast(nxt); //llT.AddLast(nxt);
} }
} }
strtNode.PrepMetatab(headEnd - strtNode.NodeEnd + strtNode.AntMetaEntries); strtNode.PrepMetatab(headEnd - strtNode.NodeEnd + strtNode.AntMetaEntries);
omgStart= strtNode.NodeEnd;
}
WriteLine(); WriteLine();
foreach (var ll in llT) foreach (var ll in llT)
{ {