U
U
uvelichitel2014-12-13 21:05:31
go
uvelichitel, 2014-12-13 21:05:31

Is it possible to make linear methods for a recursive structure?

All the code that I've seen to access the recursive structure was built on recursive functions https://play.golang.org/p/jsKrQ7l3Q9 It is known that Go does not optimize tail-call-recursion. Is it even theoretically possible otherwise? How to write a btree with non-recursive methods in Go (in any procedural language)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mamkaololosha, 2014-12-13
@uvelichitel

See graph traversal using queue or stack.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question