VIP 👤
🏠 홈
벤치마크
📊 모든 벤치마크 🦖 공룡 v1 🦖 공룡 v2 ✅ 할 일 목록 앱 🎨 창의적인 자유 페이지 🎯 FSACB - 궁극의 쇼케이스 🌍 번역 벤치마크
모델
🏆 톱 10 모델 🆓 무료 모델 📋 모든 모델 ⚙️ 킬로 코드 모드
리소스
💬 프롬프트 라이브러리 📖 AI 용어 사전 🔗 유용한 링크 🔌 AI API 및 라우터
Advanced

Algorithm Optimization

#algorithms #optimization #big-o

Optimize a naive string search algorithm description and analyze complexity.

Given a naive string matching algorithm that compares a pattern to every substring in a text, propose an optimized version using the Knuth-Morris-Pratt algorithm. Explain the preprocessing step for the partial match table and demonstrate how it reduces the time complexity from O(nm) to O(n+m). Provide a pseudocode implementation.