प्रोग्रामिङ – Programming MCQ
प्रोग्रामिङ – कम्प्युटर र IT
Programming · Computer & IT (Technical) · १,५६५ प्रश्न
१,५६५ प्रश्न उपलब्ध। मोड छान्नुहोस्:
प्रोग्रामिङ: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Merge sort is based on which algorithm design technique?
सही उत्तर: क) Divide and conquer
Merge sort divides the list into halves, sorts each recursively and merges the results.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Huffman coding, used for data compression, is an example of which algorithm design technique?
सही उत्तर: घ) Greedy method
Huffman's algorithm repeatedly merges the two least frequent symbols, a greedy choice.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The Floyd-Warshall algorithm finds:
सही उत्तर: ख) shortest paths between all pairs of vertices, in O(V^3) time
Floyd-Warshall uses dynamic programming over intermediate vertices, giving all-pairs shortest paths in cubic time.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A complete undirected graph with 6 vertices has how many edges?
सही उत्तर: क) 15
A complete graph has n(n - 1)/2 edges: 6 x 5 / 2 = 15.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
A deque (double-ended queue) allows:
सही उत्तर: ख) insertion and deletion at the front as well as at the rear
A deque generalises both stack and queue by allowing operations at both ends.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Attempting to pop an element from an empty stack causes a condition called:
सही उत्तर: क) underflow
Removing from an empty stack is underflow; pushing onto a full stack is overflow.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In a circular queue implemented with an array of size n, the rear index is advanced using:
सही उत्तर: ग) rear = (rear + 1) % n
The modulus wraps the index back to 0 after the last position, reusing freed space.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Which data structure is most commonly used to implement a priority queue efficiently?
सही उत्तर: घ) Binary heap
A heap gives O(log n) insertion and removal of the highest-priority element.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In a binary heap stored in an array with the root at index 0, the children of the node at index i are at indices:
सही उत्तर: घ) 2i + 1 and 2i + 2
With 0-based indexing, the left child is at 2i + 1 and the right child at 2i + 2; the parent is at (i - 1)/2.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Bubble sort that stops when a pass makes no swaps has what time complexity on an already sorted list?
सही उत्तर: ख) O(n)
One pass of n - 1 comparisons finds no swaps, so the algorithm stops after linear time.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।