Aller au contenu principal
🔒 Mode aperçu. Les quinze premières leçons Foundations sont gratuites ; celle-ci est Pro. Démarrez un trial de 7 jours pour débloquer l'éditeur, les conseils AI et le reste du programme. Carte requise, annulez à tout moment dans Dashboard.Démarrer le trial de 7 jours →
⚡
← Cours›Interview PrepModule 1 · Modèles Big-O et faciles›Fenêtre coulissante : somme maximalewrite4 / 104
+100 XP
Tâche🌐 shown in EN
📝 **Task:** Write `max_sum_window(arr, k)` returning the maximum sum of any contiguous subarray of length `k`. Print `max_sum_window([2, 1, 5, 1, 3, 2], 3)`. 📋 Implement the function above. Test cases run automatically. 💡 **Hint:** Re-read the theory if you get stuck — the pattern is right there.
✏️ Écris ton code ici
🐍
Chargement de Python...
Téléchargement unique (~1 Mo). Ensuite, c’est instantané.
📊 Résultat
Cliquez sur Exécuter pour voir le résultat...