Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Investigate performance of delegating `yield` in tree traversals

Open
#300 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Domain
performance

Research direction

The issue names no files, tests, or entry points; begin by locating the tree traversal implementations that manage their own stacks. Benchmark those versions against recursive traversal using TypeScript yield*, Python yield from, and Java Stream.concat, then report whether performance is comparable and which implementation should be preferred.

Written by the indexing model from the issue text.

Description

enhancement

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.

Dominant language
TypeScript
Stars
20
Forks
12
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-chronicles-code/leetcode-curriculum

All issues in code-chronicles-code/leetcode-curriculum

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.