i know we can right click the LC to use flatten.but, this time i need do the same thing in C# …
Simplify won’t work in that case when it has no other branches to simplify against, a common complaint about simplify.
List class has not simplify in C#…
But again that won’t do it, the description is “Simplify the data structure by removing path indices shared by all branches.” In your case there is no other branches to compare to"
thankyou ,but it looks too difficult to me!
i use a structure.flatten(ghpath)to flatten a tree.it works.