jwalsh / jwalsh/hy-algorithms

Implement advanced tree algorithms

Open
#24 0 comments 0 reactions 0 assignees View on GitHub
difficulty:hard tree
Dominant language
Hy
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Create implementations for advanced tree algorithms:

## Tree traversal algorithms:
- Morris traversal (in-order without recursion/stack)
- Iterative traversals (pre, in, post-order)
- Boundary traversal
- Diagonal traversal
- Vertical order traversal
- Zig-zag traversal

## Tree construction algorithms:
- Construct tree from in-order and pre-order
- Construct tree from in-order and post-order
- Construct BST from preorder
- Serialize and deserialize binary tree

## Tree manipulation:
- Convert binary tree to doubly linked list
- Lowest common ancestor
- Diameter of binary tree
- Check if trees are isomorphic
- Check if tree is balanced
- Maximum path sum in binary tree

## Requirements:
- Provide detailed complexity analysis
- Create visualization helpers
- Include comprehensive test cases
- Document practical applications

This collection will demonstrate advanced tree manipulation techniques that are essential for various algorithm designs.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by locating the repository's existing tree data structures, then split the listed algorithms into scoped tasks; done requires implementations, complexity notes, visualization helpers, comprehensive tests, and practical-application documentation.

Written by the indexing model from the issue text.

Assessment

Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.