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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Complexity The name of the module. Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant