advanced
Code Refactoring Challenge
Refactor a complex codebase to improve performance and maintainability
📝 Prompt Content
Analyze the following legacy codebase and propose a comprehensive refactoring strategy. Your solution should address these specific issues: 1) Identify and eliminate code duplication, 2) Improve time complexity of the three most computationally expensive functions, 3) Implement design patterns where appropriate, 4) Enhance modularity and separation of concerns, 5) Create unit tests for critical components, 6) Document your refactoring decisions with justifications for each major change. Focus on balancing performance improvements with long-term maintainability.