Skip to content · ⁨الانتقال إلى المحتوى⁩

Smallest and largest · ⁨الأصغر والأكبر⁩

English

Smallest and largest

Find both ends of a list in a single pass.

Keep two values at once, both starting as the first item. Check each number against both: it may replace the smallest, the largest, or neither.

العربية

الأصغر والأكبر

أوجد كلا طرفي القائمة في مرور واحد.

احتفظ بقيمتين في نفس الوقت، وكلاهما يبدأ كعنصر أول. تحقق من كل رقم مقابل كليهما: قد يحل محل الأصغر، أو الأكبر، أو لا شيء منهما.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP