कम्प्युटर र सूचना प्रविधि (प्राविधिक)
कम्प्युटर र सूचना प्रविधि (प्राविधिक)
Computer & IT (Technical) · ५,०७६ प्रश्न
५,०७६ प्रश्न उपलब्ध। मोड छान्नुहोस्:
कम्प्युटर र IT: प्रश्न र उत्तर
सही लागेको विकल्पमा थिच्नुहोस्। सही भए हरियो, गलत भए रातो देखिन्छ; ३ सेकेन्डपछि सही उत्तर र व्याख्या देखिन्छ।
सही: ० / ०
-
Binary search (mid = (low + high) / 2, integer division) looks for 7 in the sorted array [1, 3, 5, 7, 9, 11, 13]. How many comparisons with array elements are needed to find 7?
सही उत्तर: ग) 1
With low = 0 and high = 6, mid is 3 and the element at index 3 is 7, so it is found at the first comparison.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Pseudocode: N = 6, F = 0; for K = 1 to N: if N mod K = 0 then F = F + K; print F. What is printed?
सही उत्तर: घ) 12
The loop adds the divisors of 6, which are 1, 2, 3 and 6, giving 12.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Pseudocode: S = 0, I = 1; while I <= 5 do S = S + I * I; I = I + 2; end; print S. What is printed?
सही उत्तर: क) 35
I takes the values 1, 3 and 5, so S = 1 + 9 + 25 = 35.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The recurrence T(n) = 2T(n/2) + c, where c is a constant, has the solution:
सही उत्तर: क) O(n)
The recursion tree has about 2n nodes each doing constant work, so the total is linear (master theorem case 1).
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
In Big-O notation, the running time f(n) = 3n^2 + 1000n + 50 log n is:
सही उत्तर: ख) O(n^2)
Big-O keeps only the fastest-growing term and drops constant factors, so n^2 dominates.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
The keys 10, 20, 5 and 30 are inserted one by one into an empty max-heap stored in an array. What is the array after the last insertion?
सही उत्तर: ग) [30, 20, 5, 10]
After 10, 20, 5 the heap is [20, 10, 5]; 30 is added at index 3, swapped with 10 and then with 20, giving [30, 20, 5, 10].
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Quicksort with the Lomuto partition scheme uses the last element as pivot. After partitioning [3, 8, 2, 5, 1, 4], at which index (0-based) does the pivot end up?
सही उत्तर: घ) 3
Three elements (3, 2, 1) are smaller than the pivot 4, so it is placed just after them at index 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is printed by the C code: int n = 10, i, j, c = 0; for (i = 0; i < n; i++) for (j = 0; j < i; j++) c++; printf("%d", c); ?
सही उत्तर: घ) 45
The inner loop runs 0 + 1 + ... + 9 times, which is n(n - 1)/2 = 45.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
What is the time complexity of: for (i = 1; i < n; i *= 2) for (j = 0; j < i; j++) count++; ?
सही उत्तर: क) O(n)
The inner loop runs 1 + 2 + 4 + ... up to less than n times, a geometric series whose sum is less than 2n.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
-
Keys 12, 7, 22 and 3 are inserted into a hash table of size 5 using h(k) = k mod 5 with separate chaining. What is the length of the longest chain?
सही उत्तर: ख) 3
12, 7 and 22 all give remainder 2, so they share one chain; 3 goes to slot 3.
💬 टिप्पणी / गल्ती रिपोर्ट (०)
यी अभ्यास प्रश्न हुन्, आधिकारिक प्रश्न होइनन्। पाठ्यक्रम, विज्ञापन र नतिजाका लागि सम्बन्धित निकायको आधिकारिक वेबसाइट हेर्नुहोस्। उत्तरमा गल्ती भेटे प्रश्नमुनिको "टिप्पणी / गल्ती रिपोर्ट" मा लेख्नुहोस्।
नमस्ते! पाठ्यक्रम, सामान्य ज्ञान, भाषा परीक्षा वा कुनै प्रश्नको उत्तर बुझ्न सोध्नुहोस्।
AI ले गल्ती गर्न सक्छ। महत्वपूर्ण कुरा आधिकारिक स्रोतमा जाँच्नुहोस्।