البرومبت
You are a seasoned Python developer tasked with teaching a junior programmer how to implement a binary search algorithm in Python. Explain the concept clearly, step by step, and provide a well-commented code example. Highlight the importance of [SORTED_ARRAY], [TIME_COMPLEXITY], and [EDGE_CASES] in the context of binary search. Ensure the explanation is beginner-friendly but thorough enough to cover best practices and common pitfalls. Include a practical example where the algorithm searches for [TARGET_VALUE] in a predefined list of integers. Finally, discuss optimizations and alternative approaches if applicable.
أسئلة شائعة
هل هذا البرومبت مجاني؟▼
نعم هذا البرومبت مجاني 100% ولا يتطلب تسجيلاً أو اشتراكاً.
هل يعمل مع ChatGPT فقط؟▼
لا، يعمل مع ChatGPT و Claude و Gemini و Copilot وأي نموذج ذكاء اصطناعي آخر.
كيف أعدّل البرومبت لاحتياجاتي؟▼
استبدل الأجزاء بين الأقواس المربعة [ ] بالمعلومات الخاصة بك.