Μετάβαση στο κύριο περιεχόμενο
⚡
← Μαθήματα›Interview PrepΕνότητα 1 · Big-O & Easy Patterns›Δύο δείκτες: άθροισμα ζεύγουςwrite2 / 104
+75 XP
Εργασία🌐 shown in EN
📝 **Task:** Write `pair_sum_sorted(arr, target)` that returns `[i, j]` (indices) of the first pair in the sorted list `arr` that sums to `target`, or `[]` if no such pair exists. Then test with `pair_sum_sorted([1, 2, 4, 7, 11], 9)` and print the result. 📋 Implement the function above. Test cases run automatically. 💡 **Hint:** Re-read the theory if you get stuck — the pattern is right there.
✏️ Γράψε τον κώδικά σου εδώ
🐍
Φόρτωση Python...
Λήψη μία φορά (~1 MB). Μετά τρέχει αμέσως.
📊 Αποτέλεσμα
Πάτα Εκτέλεση για να δεις το αποτέλεσμα...