Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

The src/algorithms/ proxy layer was incomplete—missing sorting algorithms and the entire searching directory, despite implementations existing in interview_workbook/.

Changes

src/algorithms/sorting/

  • Added heap_sort, merge_sort, quick_sort to __all__ and created corresponding proxy modules

src/algorithms/searching/ (new)

  • Created directory with __init__.py using lazy loading pattern
  • Added proxy modules: advanced_search, binary_search, linear_search, quickselect

Usage

# Previously incomplete/missing, now available:
from algorithms.sorting import heap_sort, merge_sort, quick_sort
from algorithms.searching import binary_search, linear_search, quickselect

arr = [64, 34, 25, 12, 22, 11, 90]
sorted_arr = merge_sort.merge_sort(arr)
index = binary_search.binary_search(sorted_arr, 25)

All proxy modules follow the established pattern with wildcard imports from interview_workbook.

Original prompt

Can you go through each demo/algorithm and add the missing parts until all are complete


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Add missing sorting algorithms (heap_sort, merge_sort, quick_sort) to src/algorithms/sorting/
Create new src/algorithms/searching/ directory with all searching algorithms
Update __all__ lists to include all available algorithms

Co-authored-by: ianlintner <[email protected]>
Copilot AI changed the title [WIP] Add missing parts to complete demo algorithms Complete missing proxy modules in src/algorithms Oct 29, 2025
Copilot AI requested a review from ianlintner October 29, 2025 02:50
Copilot finished work on behalf of ianlintner October 29, 2025 02:50
@ianlintner ianlintner marked this pull request as ready for review October 29, 2025 02:52
Copilot AI review requested due to automatic review settings October 29, 2025 02:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds proxy modules for three sorting algorithms (heap_sort, merge_sort, quick_sort) and four searching algorithms (advanced_search, binary_search, linear_search, quickselect) to enable imports from src.algorithms.sorting.* and src.algorithms.searching.*. It also creates a new __init__.py for the searching namespace with lazy loading and updates the sorting __init__.py to include the new algorithms in __all__ and documentation.

  • Adds proxy modules for heap_sort, merge_sort, and quick_sort in src/algorithms/sorting/
  • Adds proxy modules for advanced_search, binary_search, linear_search, and quickselect in src/algorithms/searching/
  • Creates lazy loading infrastructure for src/algorithms/searching/init.py

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/algorithms/sorting/quick_sort.py Proxy module redirecting to interview_workbook implementation
src/algorithms/sorting/merge_sort.py Proxy module redirecting to interview_workbook implementation
src/algorithms/sorting/heap_sort.py Proxy module redirecting to interview_workbook implementation
src/algorithms/sorting/init.py Updated all list and docstring to include heap_sort, merge_sort, and quick_sort
src/algorithms/searching/quickselect.py Proxy module redirecting to interview_workbook implementation
src/algorithms/searching/linear_search.py Proxy module redirecting to interview_workbook implementation
src/algorithms/searching/binary_search.py Proxy module redirecting to interview_workbook implementation
src/algorithms/searching/advanced_search.py Proxy module redirecting to interview_workbook implementation
src/algorithms/searching/init.py New lazy loading namespace for searching algorithms with getattr implementation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ianlintner
Copy link
Owner

@copilot The tests are failing on PR

@ianlintner ianlintner merged commit daf920c into main Oct 29, 2025
18 of 19 checks passed
@ianlintner ianlintner deleted the copilot/complete-demo-algorithms branch October 29, 2025 02:56
Copilot AI requested a review from ianlintner October 29, 2025 02:56
Copilot finished work on behalf of ianlintner October 29, 2025 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants