code-chronicles-code / code-chronicles-code/leetcode-curriculum
Investigate performance of delegating `yield` in tree traversals
Abierto
enhancement
- Lenguaje dominante
- TypeScript
- Estrellas
- 20
- Forks
- 12
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.