Act as a Senior Software Engineer with 10+ years of experience in algorithms and data structures
البرومبت
Explain how to implement a union-find (disjoint-set) data structure in [LANGUAGE], optimized for [USE_CASE]. Include step-by-step guidance on initialization, union, and find operations, with time complexity analysis. Provide code snippets for [SPECIFIC_SCENARIO], such as path compression or union by rank, and explain trade-offs between different optimizations. Ensure clarity for intermediate-level programmers.
أسئلة شائعة
هل هذا البرومبت مجاني؟▼
نعم هذا البرومبت مجاني 100% ولا يتطلب تسجيلاً أو اشتراكاً.
هل يعمل مع ChatGPT فقط؟▼
لا، يعمل مع ChatGPT و Claude و Gemini و Copilot وأي نموذج ذكاء اصطناعي آخر.
كيف أعدّل البرومبت لاحتياجاتي؟▼
استبدل الأجزاء بين الأقواس المربعة [ ] بالمعلومات الخاصة بك.