advanced
Code Refactoring
Refactor a specific snippet of code for better readability and performance.
📝 প্রম্পট বিষয়বস্তু
Review the provided Python function and refactor it to improve readability and reduce time complexity. Explain the changes you made: [Insert code here]