🏠 Início
Avaliações
📊 Todos os Benchmarks 🦖 Dinossauro v1 🦖 Dinossauro v2 ✅ Aplicações To-Do List 🎨 Páginas Livres Criativas 🎯 FSACB - Showcase Definitivo 🌍 Benchmark de Tradução
Modelos
🏆 Top 10 Modelos 🆓 Modelos Gratuitos 📋 Todos os Modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de Prompts 📖 Glossário de IA 🔗 Links Úteis
advanced

Advanced Algorithm Optimization

#algorithms #optimization #performance

Optimize a complex algorithm with multiple constraints

You are tasked with optimizing a complex algorithm that processes large datasets. The algorithm currently has a time complexity of O(n³) and needs to be reduced to at least O(n² log n). Additionally, you must reduce the space complexity from O(n²) to O(n). Identify the specific bottlenecks in the following algorithm, propose alternative approaches, and implement your solution. Discuss the trade-offs of your optimization and analyze the worst-case scenario.