2461
GB
What is 'binary search debugging' and in what scenario is it most effective?
IN
'बाइनरी सर्च डिबगिंग' क्या है और यह किस परिदृश्य में सबसे प्रभावी है?
A
Uses two debuggers simultaneously to find bugs in half the time
आधे समय में बग ढूंढने के लिए एक साथ दो डिबगर्स का उपयोग करता है
B
Systematically halves the search space by inserting diagnostic checks at midpoints to determine which half contains the fault — most effective when fault location is unknown in a large codebase or long sequence of operations
यह निर्धारित करने के लिए कि किस आधे हिस्से में गलती है, मध्य बिंदुओं पर नैदानिक जांच डालकर खोज स्थान को व्यवस्थित रूप से आधा कर देता है - सबसे प्रभावी जब बड़े कोडबेस या संचालन के लंबे अनुक्रम में गलती का स्थान अज्ञात होता है
C
Only works with sorted data structures and linked lists
केवल क्रमबद्ध डेटा संरचनाओं और लिंक की गई सूचियों के साथ काम करता है
D
A tool built into GDB for finding memory corruption
स्मृति भ्रष्टाचार का पता लगाने के लिए जीडीबी में निर्मित एक उपकरण
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English)
'git bisect' implements binary search debugging for version history: given known-good and known-bad commits, it checks midpoint commits to bisect the fault-introducing commit in O(log n) steps. Applied to code, inserting assertions at midpoints narrows fault location logarithmically.
व्याख्या (हिन्दी)
'गिट बाइसेक्ट' संस्करण इतिहास के लिए बाइनरी सर्च डिबगिंग लागू करता है: ज्ञात-अच्छे और ज्ञात-बुरे कमिट को देखते हुए, यह ओ (लॉग एन) चरणों में गलती-परिचय कमिट को बाइसेक्ट करने के लिए मध्यबिंदु कमिट की जांच करता है। कोड पर लागू, मध्यबिंदु पर अभिकथन डालने से गलती का स्थान लघुगणकीय रूप से कम हो जाता है।