कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
How many non-empty contiguous substrings does a string of 4 distinct characters, such as "abcd", have?
सही उत्तर: ख) 10
A string of length n has n(n + 1)/2 non-empty substrings: 4 x 5 / 2 = 10.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The prefix-sum array of A = [3, 1, 4, 1, 5] is P = [3, 4, 8, 9, 14], where P[i] = A[0] + ... + A[i]. The sum A[1] + A[2] + A[3] equals:
सही उत्तर: क) 6
The sum of A[1..3] is P[3] - P[0] = 9 - 3 = 6 (= 1 + 4 + 1).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Two indices start at the two ends of a sorted array and move towards each other to find a pair with a given sum. The time complexity of this two-pointer method is:
सही उत्तर: घ) O(n)
Each step moves one of the pointers inward, so at most n steps are made.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The 'undo' feature of a text editor, which reverses the most recent action first, is most naturally implemented using a:
सही उत्तर: ग) stack
Undo follows last-in, first-out order: the last action performed is the first undone, which is a stack.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Reversing a singly linked list of n nodes iteratively, by changing the next pointers, needs how much extra memory?
सही उत्तर: ख) O(1)
Only a few pointers (previous, current, next) are needed, regardless of the list size.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Building a binary heap from an unsorted array of n elements using the bottom-up (heapify) method takes:
सही उत्तर: क) O(n)
Bottom-up heap construction does most of its work on low-height nodes, giving a total of O(n), which is better than n separate insertions.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The inorder traversal of any binary search tree visits the keys in:
सही उत्तर: घ) ascending (sorted) order
In a BST, left subtree < root < right subtree, so left-root-right visiting gives the keys in sorted ascending order.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Convert the parenthesised infix expression (A + B) * C into prefix notation, with each operator written before its operands.
सही उत्तर: ग) *+ABC
The operator comes before its operands: (A + B) becomes +AB, and multiplying by C gives *+ABC.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
How many swaps does bubble sort perform to sort [4, 1, 3, 2] into ascending order?
सही उत्तर: ख) 4
Bubble sort swaps exactly once per inversion; the inversions are (4,1), (4,3), (4,2) and (3,2), so 4 swaps.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the output of the Python code: a, b = 0, 1; then for _ in range(6): a, b = b, a + b; finally print(a) ?
सही उत्तर: क) 8
This generates Fibonacci numbers; after 6 steps a takes the values 1, 1, 2, 3, 5, 8.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।