private void DeleteMarkedNodes()
{
CheckProperties();
while (nodesToDelete.Count > 0)
{
var pos = nodesToDelete.Count - 1;
var n = nodesToDelete[pos];
// combine section of n with the following section
var s = n.Successor;
if (s != null)
{
s.length += n.length;
}
RemoveNode(n);
if (s != null)
{
UpdateAugmentedData(s);
}
nodesToDelete.RemoveAt(pos);
CheckProperties();
}
CheckProperties();
}