Add greedy algorithm implementations
- Dominant language
- Hy
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Implement classic greedy algorithms and problems:
## Algorithms to implement:
- Activity selection problem
- Huffman coding
- Fractional knapsack
- Minimum spanning tree (Prim's and Kruskal's)
- Dijkstra's shortest path
- Job sequencing with deadlines
- Egyptian fractions
- Interval scheduling
## Requirements:
- Include proof of correctness for each algorithm
- Provide detailed docstrings with complexity analysis
- Implement test cases with varied input scenarios
- Add example use cases and applications
## Educational content:
- Explain the greedy choice property
- Contrast with dynamic programming approaches
- Document cases where greedy algorithms fail
- Show greedy algorithm design patterns
This collection will demonstrate important optimization techniques and trade-offs in algorithm design.
Contributor guide
Research direction
No files, tests, or entry points are named; first review the repository's existing algorithm implementations and testing conventions. Done means implementing all listed greedy algorithms, with correctness proofs, complexity-focused docstrings, varied tests, examples, and the requested educational explanations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100