⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Luke-Manyamazi
Copy link

@Luke-Manyamazi Luke-Manyamazi commented Nov 10, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

  • Optimized find_longest_common_prefix using sorting to reduce comparisons from O(n²) to O(n log n)
  • Enhanced count_letters with fixed-size arrays for O(1) lookups instead of dictionary operations
  • Both functions now handle edge cases efficiently with minimal memory overhead

Questions

  1. Why does the test_long_string test hang when included, but the other 4 tests pass when it's commented out?
  2. Is the issue with generating a 10 million character string or with the count_letters function performance?
  3. Should we optimize the string generation logic or add a timeout to prevent hanging?
  4. Could the problem be with the still_to_include set logic creating an infinite loop?

@Luke-Manyamazi Luke-Manyamazi added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Complexity The name of the module. labels Nov 10, 2025
Copy link

@OracPrime OracPrime left a comment

Choose a reason for hiding this comment

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

Nice code

@OracPrime OracPrime added Complete Volunteer to add when work is complete and all review comments have been addressed. Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Complexity The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants