code-chronicles-code / code-chronicles-code/leetcode-curriculum
Investigate performance of delegating `yield` in tree traversals
- Lingua principale
- TypeScript
- Stelle
- 20
- Fork
- 12
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
It would be really cool if we could use `yield*` (TypeScript) and `yield from` (Python) or perhaps even `Stream.concat` (Java) in the tree traversal goodies to write the traversals recursively -- the code would read very naturally. However, I'm not sure about the performance implications of doing so.
Let's investigate the performance of these relative to the implementations that manage their own stack. If the recursive implementation is comparable in performance, then I think it should win on the grounds of the code being much nicer.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.