→ البرمجة والكود
💻 البرمجة والكود 🤖 ChatGPT
Act as a Competitive Programmer with 5+ Years of Experience
البرومبت
Explain how to implement a Fenwick Tree (Binary Indexed Tree) step-by-step for efficient range queries and point updates. Cover the following: 1. [DATA_STRUCTURE] - Describe the underlying structure and why it's efficient (O(log n) operations). 2. [OPERATIONS] - Detail how to perform point updates (add a value to an index) and prefix sum queries (sum from 1 to [INDEX]). 3. [USE_CASE] - Provide a concrete example (e.g., solving a problem like 'Range Sum Queries' on [PLATFORM]). Include code snippets in [LANGUAGE] (e.g., Python/C++) with comments. Highlight common pitfalls (e.g., off-by-one errors) and optimization tips (e.g., 1-based indexing).

كيف تستخدم هذا البرومبت؟

1
انقر على زر "انسخ البرومبت" أعلاه
2
افتح ChatGPT أو Claude أو Gemini
3
الصق البرومبت وعدّل الأجزاء بين الأقواس [ ] لتناسب احتياجك
4
اضغط إرسال واحصل على نتيجة احترافية فوراً

أسئلة شائعة

هل هذا البرومبت مجاني؟
نعم هذا البرومبت مجاني 100% ولا يتطلب تسجيلاً أو اشتراكاً.
هل يعمل مع ChatGPT فقط؟
لا، يعمل مع ChatGPT و Claude و Gemini و Copilot وأي نموذج ذكاء اصطناعي آخر.
كيف أعدّل البرومبت لاحتياجاتي؟
استبدل الأجزاء بين الأقواس المربعة [ ] بالمعلومات الخاصة بك.