Is there an elegant way to non-destructively step through a red black tree?
WhatMeWorry
kheaser at gmail.com
Thu Mar 20 23:51:46 UTC 2025
Is there an elegant way, like with foreach, to step through a
red black tree non-destructively? This destructive failure is
the best I've been able to come up with.
while(!rbt.empty)
{
Node e = rbt.front;
writeln("e = ", e);
rbt.removeFront;
}
I don't suppose there are any gentle tutorials regarding the
library containers?
More information about the Digitalmars-d-learn
mailing list