PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Selection Sort: Finding Minimum, In-Place Non-Stable (सिलेक्शन सॉर्ट: न्यूनतम तत्व खोजना और अनसॉर्टेड भाग में स्वैपिंग) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Selection Sort repeatedly scans the unsorted suffix to find the minimum element and performs one swap per pass, guaranteeing O(n) writes in O(n^2) invariant time while being in-place and non-stable.
अध्याय सार: सिलेक्शन सॉर्ट हर पास में अनसॉर्टेड भाग से सबसे छोटा तत्व खोजकर एक ही बार स्वैप करता है, जिससे डेटा राइट्स (Swaps) मात्र O(n) रहते हैं, हालांकि तुलनाएँ हर स्थिति में O(n^2) होती हैं और यह नॉन-स्टेबल होता है।
Selection Sort: Finding Minimum, In-Place Non-Stable: Detailed Notes & Architecture (सिलेक्शन सॉर्ट: न्यूनतम तत्व खोजना और अनसॉर्टेड भाग में स्वैपिंग)
1. Minimum-Selection & Partition Invariant (न्यूनतम तत्व चयन व विभाजन नियम)
[EN] Selection Sort logically splits the array into a growing sorted prefix arr[0..i-1] and a shrinking unsorted suffix arr[i..n-1]. During pass i (from 0 to n-2), it initializes min_idx = i, scans every j from i+1 to n-1 to locate the smallest element in the suffix, and swaps arr[i] with arr[min_idx] (only if min_idx != i). After n-1 passes, all elements stand sorted in ascending order.
[HI] सिलेक्शन सॉर्ट एरे को दो भागों में बांटता है: बायाँ सॉर्टेड भाग arr[0..i-1] और दायाँ अनसॉर्टेड भाग arr[i..n-1]। पास i (0 से n-2) में एल्गोरिदम min_idx = i मानकर पूरे अनसॉर्टेड भाग को स्कैन करता है, सबसे छोटे तत्व का इंडेक्स ढूंढता है और अंत में केवल एक बार arr[i] व arr[min_idx] की अदला-बदली (Swap) करता है।
2. Why Comparisons Are Always Theta(n^2) (Non-Adaptive) (हर स्थिति में Theta(n^2) तुलनाएँ (नॉन-एडैप्टिव स्वभाव))
[EN] Unlike Adaptive Bubble Sort or Insertion Sort, Selection Sort has no early-exit mechanism because scanning arr[i+1..n-1] cannot prove the remaining elements are already ordered relative to one another. Therefore, regardless of whether the array is already sorted, random, or reversed, it performs exactly (n-1) + (n-2) + ... + 1 = n(n-1)/2 comparisons. Best, Average, and Worst time complexities are all strictly Theta(n^2).
[HI] एडैप्टिव बबल या इंसर्शन सॉर्ट के विपरीत, सिलेक्शन सॉर्ट पहले से सॉर्टेड एरे पर भी बीच में रुक नहीं सकता क्योंकि न्यूनतम खोजने के लिए पूरा अनसॉर्टेड भाग स्कैन करना पड़ता है। इसलिए इनपुट सॉर्टेड हो, रैंडम हो या उलटा हो, इसमें हमेशा (n-1) + (n-2) + ... + 1 = n(n-1)/2 तुलनाएँ होती हैं और बेस्ट, एवरेज व वर्स्ट केस तीनों Theta(n^2) रहते हैं।
3. O(n) Minimum Swaps & Flash/EEPROM Hardware Advantage (अधिकतम O(n) स्वैप व हार्डवेयर मेमोरी लाभ)
[EN] Selection Sort's standout virtue is minimizing memory writes: each of the n-1 outer passes executes at most 1 swap, capping total swaps at n - 1 (O(n) writes) vs O(n^2) in Bubble and Insertion Sort. When writing to storage wears out hardware or is orders of magnitude slower than reading (such as EEPROM, Flash memory, or swapping huge struct records), Selection Sort can outperform Insertion/Bubble Sort.
[HI] सिलेक्शन सॉर्ट की सबसे बड़ी विशेषता इसकी बहुत कम मेमोरी-राइट्स (Swaps) संख्या है: n-1 पास में कुल अधिकतम n - 1 स्वैप (O(n)) ही होते हैं, जबकि बबल व इंसर्शन में O(n^2) राइट्स हो सकते हैं। जहाँ मेमोरी पर लिखने (Write) की लागत बहुत अधिक हो—जैसे Flash/EEPROM मेमोरी या बड़े रिकॉर्ड्स को हिलाना—वहाँ सिलेक्शन सॉर्ट उपयोगी होता है।
4. In-Place Execution & Non-Stability Counterexample (इन-प्लेस कार्य व नॉन-स्टेबिलिटी का उदाहरण)
[EN] Selection Sort requires only O(1) auxiliary space for index variables min_idx, i, and j. However, standard swap-based Selection Sort is NOT stable because long-distance swaps can jump an element past equal duplicates. Take [4a, 4b, 2]: in pass 0, minimum '2' swaps with '4a', producing [2, 4b, 4a]—reversing the original relative order of 4a and 4b.
[HI] यह एल्गोरिदम केवल O(1) अतिरिक्त स्पेस (min_idx आदि वेरिएबल) उपयोग करके इन-प्लेस काम करता है। परंतु सामान्य स्वैपिंग के कारण यह स्टेबल (Stable) नहीं है क्योंकि दूर स्थित न्यूनतम मान को आगे लाने पर कोई तत्व अपने ही बराबर मान को लांघ जाता है। उदाहरण: [4a, 4b, 2] में पहले पास में 2 व 4a स्वैप होकर [2, 4b, 4a] बन जाता है, जिससे 4a और 4b का क्रम उलट जाता है।
Syntax, Formula & Technical Example (Selection Sort: Finding Minimum, In-Place Non-Stable)
void selectionSort(int arr[], int n) {
for (int i = 0; i < n - 1; i++) {
int min_idx = i;
for (int j = i + 1; j < n; j++)
if (arr[j] < arr[min_idx]) min_idx = j;
if (min_idx != i) {
int t = arr[i]; arr[i] = arr[min_idx]; arr[min_idx] = t;
}
}
}
Selection Sort: Finding Minimum, In-Place Non-Stable Quick Reference & Comparison Table
| Selection Sort Metric | Exact Formula / Property | Exam & Practical Fact |
|---|---|---|
| Total Comparisons (All Cases) | Always n(n-1)/2; strictly Theta(n^2) | Non-adaptive: ignores pre-sorted input order |
| Maximum Swaps (Data Writes) | At most n - 1 swaps; O(n) writes | Preferred when Flash/EEPROM write cycles are costly |
| Stability Behavior | Unstable via direct swap (e.g., [4a,4b,2]) | Long-range swap jumps over equal elements |
| Space & In-Place Nature | O(1) auxiliary space; In-Place | Requires no temporary array buffer |
Selection Sort: Finding Minimum, In-Place Non-Stable Top 20 Bilingual MCQs with Answers
Q1. What is the best-case time complexity of standard Selection Sort on an already sorted array of n elements?
(पहले से सॉर्टेड n तत्वों वाले एरे पर मानक सिलेक्शन सॉर्ट की बेस्ट-केस टाइम कॉम्प्लेक्सिटी क्या होती है?)
(A) O(n log n)
(B) O(n^2)
(C) O(n)
(D) O(1)
Correct Answer: (B)
[EN] Selection Sort scans the entire unsorted suffix in every pass regardless of initial order, doing n(n-1)/2 comparisons.
[HI] सिलेक्शन सॉर्ट पहले से सॉर्टेड होने पर भी हर पास में न्यूनतम तत्व खोजने के लिए पूरा अनसॉर्टेड भाग स्कैन करता है, अतः समय O(n^2) ही रहता है।
Q2. At most how many swaps are performed by Selection Sort on an array of n elements?
(n तत्वों के एरे को सॉर्ट करने में सिलेक्शन सॉर्ट अधिकतम कितने स्वैप (Swaps) करता है?)
(A) n(n - 1) / 2
(B) n^2
(C) log2(n)
(D) n - 1
Correct Answer: (D)
[EN] It performs at most one swap at the end of each of the n - 1 outer passes.
[HI] प्रत्येक बाहरी पास (कुल n - 1 पास) के अंत में अधिकतम केवल एक स्वैप किया जाता है।
Q3. Why is standard Selection Sort classified as an UNSTABLE sorting algorithm?
(मानक सिलेक्शन सॉर्ट को अनस्टेबल (Unstable) एल्गोरिदम क्यों माना जाता है?)
(A) It fails on negative numbers
(B) It uses recursion beyond stack depth
(C) A long-distance swap can move an element past an equal-valued element
(D) It changes array length during execution
Correct Answer: (C)
[EN] In [4a, 4b, 2], swapping 4a with 2 puts 4a after 4b ([2, 4b, 4a]), breaking original order of equal keys.
[HI] लंबी दूरी के स्वैप से समान मान वाले तत्व का क्रम बदल जाता है, जैसे [4a, 4b, 2] पहले पास में [2, 4b, 4a] बन जाता है।
Q4. In which scenario does Selection Sort have a clear advantage over Insertion Sort and Bubble Sort?
(किस परिस्थिति में सिलेक्शन सॉर्ट को इंसर्शन व बबल सॉर्ट पर स्पष्ट बढ़त मिलती है?)
(A) When stability of equal keys is strictly mandatory
(B) When memory write operations are much more expensive than read operations (e.g., Flash/EEPROM)
(C) When sorting streaming online data
(D) When the input array is nearly sorted
Correct Answer: (B)
[EN] Selection Sort bounds writes to O(n), whereas Bubble and Insertion Sort can perform O(n^2) swaps/shifts.
[HI] चूंकि सिलेक्शन सॉर्ट में राइट्स (Swaps) अधिकतम n-1 होते हैं, इसलिए Flash/EEPROM जैसी महंगी राइट मेमोरी में यह बेहतर है।
Q5. Trace Selection Sort on [64, 25, 12, 22, 11]. What is the array state immediately after Pass 2 (two outer iterations)?
(एरे [64, 25, 12, 22, 11] पर सिलेक्शन सॉर्ट के 2 पास पूरे होने के बाद एरे की स्थिति क्या होगी?)
(A) [12, 11, 25, 22, 64]
(B) [11, 12, 22, 25, 64]
(C) [11, 12, 25, 22, 64]
(D) [11, 25, 12, 22, 64]
Correct Answer: (C)
[EN] Pass 1 swaps 64 & 11 -> [11, 25, 12, 22, 64]. Pass 2 finds min 12 in suffix and swaps with 25 -> [11, 12, 25, 22, 64].
[HI] पास 1 में 64 और 11 स्वैप ([11, 25, 12, 22, 64]); पास 2 में 25 और 12 स्वैप होकर [11, 12, 25, 22, 64] बनता है।
Q6. Can Selection Sort be modified to become STABLE without increasing auxiliary space beyond O(1)?
(क्या सिलेक्शन सॉर्ट को O(1) अतिरिक्त स्पेस में रहते हुए स्टेबल (Stable) बनाया जा सकता है?)
(A) Yes, by running it backward
(B) No, Selection Sort can never be made stable
(C) Yes, simply by changing '<' to '<=' in the minimum search
(D) Yes, by shifting elements right by 1 slot and inserting the minimum instead of swapping directly
Correct Answer: (D)
[EN] Instead of swapping arr[i] with arr[min_idx], shifting arr[i..min_idx-1] right by 1 preserves order of duplicates (increasing writes to O(n^2)).
[HI] सीधे स्वैप के बजाय arr[i..min_idx-1] को दाईं ओर खिसकाकर (Shift) न्यूनतम तत्व को स्थान पर रखने से यह स्टेबल बन जाता है।
Q7. What happens if someone changes 'if (arr[j] < arr[min_idx])' to 'if (arr[j] <= arr[min_idx])' during swap-based Selection Sort?
(स्वैप-आधारित सिलेक्शन सॉर्ट में '<' के स्थान पर '<=' लिखने से क्या प्रभाव पड़ेगा?)
(A) It makes Selection Sort stable
(B) It picks the rightmost equal minimum and STILL remains unstable overall
(C) It improves worst-case time to O(n)
(D) It reduces comparisons by half
Correct Answer: (B)
[EN] Even if the rightmost duplicate is picked in one edge case, swapping the leftmost element of a tie earlier still breaks stability (e.g., [4a, 4b, 2]).
[HI] अंतिम बराबर तत्व चुनने पर भी [4a, 4b, 2] जैसे मामलों में 4a को 2 से स्वैप करने पर अस्थिरता बनी रहती है।
Q8. How many comparisons does Selection Sort perform on an array of 10 elements?
(10 तत्वों के एरे पर सिलेक्शन सॉर्ट कुल कितनी तुलनाएँ (Comparisons) करेगा?)
(A) 100
(B) 45
(C) 9
(D) 55
Correct Answer: (B)
[EN] Comparisons = n(n-1)/2 = 10 * 9 / 2 = 45 regardless of element values.
[HI] मान कुछ भी हों, तुलनाएँ हमेशा n(n-1)/2 = 10 * 9 / 2 = 45 ही होती हैं।
Q9. What is the auxiliary space complexity of standard iterative Selection Sort?
(मानक इटरेटिव सिलेक्शन सॉर्ट की ऑक्सिलरी स्पेस कॉम्प्लेक्सिटी कितनी होती है?)
(A) O(1)
(B) O(n log n)
(C) O(log n)
(D) O(n)
Correct Answer: (A)
[EN] Only scalar loop indices and min_idx are used; no extra array is allocated.
[HI] इसमें केवल कुछ स्केलर इंडेक्स वेरिएबल लगते हैं, अतः स्पेस कॉम्प्लेक्सिटी O(1) है।
Q10. Which property best describes Selection Sort among 'Adaptive' and 'In-Place'?
('एडैप्टिव' और 'इन-प्लेस' गुणों के संदर्भ में सिलेक्शन सॉर्ट के लिए कौन सा विकल्प सही है?)
(A) Adaptive, but NOT In-Place
(B) Neither In-Place nor Adaptive
(C) Both In-Place and Adaptive
(D) In-Place, but NOT Adaptive
Correct Answer: (D)
[EN] It sorts within the input array (O(1) space -> In-Place) but always runs n(n-1)/2 comparisons regardless of input order (Not Adaptive).
[HI] यह O(1) मेमोरी में इन-प्लेस सॉर्ट करता है, परंतु इनपुट क्रम के अनुसार तेज नहीं होता (नॉन-एडैप्टिव)।
Q11. In the array [1, 2, 3, 4, 5], if Selection Sort uses 'if (min_idx != i)' before swapping, how many swaps occur?
(एरे [1, 2, 3, 4, 5] पर यदि स्वैप से पहले 'if (min_idx != i)' शर्त लगी हो, तो कुल कितने स्वैप होंगे?)
(A) 4 swaps
(B) 10 swaps
(C) 5 swaps
(D) 0 swaps (while still doing 10 comparisons)
Correct Answer: (D)
[EN] Since each arr[i] is already the minimum of its suffix, min_idx == i in every pass, resulting in 0 actual swaps.
[HI] हर पास में arr[i] पहले से ही न्यूनतम है, इसलिए min_idx == i रहेगा और 0 स्वैप (परंतु 10 तुलनाएँ) होंगी।
Q12. What does a 'Double-Ended Selection Sort' (Min-Max Selection Sort) do in each pass?
('डबल-एंडेड सिलेक्शन सॉर्ट' (मिन-मैक्स सिलेक्शन) प्रत्येक पास में क्या करता है?)
(A) Reduces worst-case time to O(n log n)
(B) Finds both the minimum and maximum in one scan and places them at both ends simultaneously
(C) Uses two pivots like Dual-Pivot Quicksort
(D) Sorts only even-indexed elements
Correct Answer: (B)
[EN] Placing both min at front and max at back cuts outer passes to n/2, though asymptotic time remains O(n^2).
[HI] यह एक ही स्कैन में न्यूनतम व अधिकतम दोनों को खोजकर दोनों सिरों पर रखता है, जिससे पास आधे हो जाते हैं (कॉम्प्लेक्सिटी O(n^2) ही रहती है)।
Q13. Which sorting algorithm is Selection Sort structurally identical to if you replace the linear suffix scan with a Max-Heap?
(यदि सिलेक्शन सॉर्ट में रैखिक स्कैन की जगह मैक्स-हीप से अधिकतम तत्व निकाला जाए, तो कौन सा एल्गोरिदम बनता है?)
(A) Heap Sort
(B) Merge Sort
(C) Radix Sort
(D) Quick Sort
Correct Answer: (A)
[EN] Heap Sort improves Selection Sort by finding the next extremum in O(log n) via a heap instead of O(n) linear scanning.
[HI] हीप सॉर्ट वास्तव में सिलेक्शन सॉर्ट का ही उन्नत रूप है जहाँ अगला बड़ा तत्व O(n) स्कैन के बजाय O(log n) में हीप से निकाला जाता है।
Q14. For an array of 5 distinct elements, what is the minimum possible number of comparisons Selection Sort can ever take?
(5 भिन्न तत्वों वाले एरे में सिलेक्शन सॉर्ट कम से कम कितनी तुलनाएँ करेगा?)
(A) 5
(B) 4
(C) 10
(D) 9
Correct Answer: (C)
[EN] Selection Sort performs n(n-1)/2 = 5*4/2 = 10 comparisons even in its best case.
[HI] सिलेक्शन सॉर्ट बेस्ट केस में भी निश्चित रूप से n(n-1)/2 = 10 तुलनाएँ ही करता है।
Q15. Which statement is NOT true about Selection Sort?
(सिलेक्शन सॉर्ट के बारे में इनमें से कौन सा कथन असत्य है?)
(A) Its worst-case time complexity is O(n^2)
(B) It performs at most n - 1 swaps
(C) It is not stable in its standard form
(D) It outperforms Insertion Sort on nearly sorted data because of its O(n) best case
Correct Answer: (D)
[EN] Selection Sort has NO O(n) best case—its best case is O(n^2), whereas Insertion Sort has an O(n) best case.
[HI] सिलेक्शन सॉर्ट का बेस्ट केस O(n) नहीं बल्कि O(n^2) होता है, इसलिए लगभग सॉर्टेड डेटा पर इंसर्शन सॉर्ट कहीं अधिक तेज रहता है।
Q16. Which sorting algorithm achieves the theoretical minimum number of memory writes (even fewer than Selection Sort when keys repeat cycles)?
(मेमोरी राइट्स की न्यूनतम संख्या प्राप्त करने के लिए सिलेक्शन सॉर्ट से भी आगे कौन सा एल्गोरिदम उपयोग होता है?)
(A) Cycle Sort
(B) Bubble Sort
(C) Merge Sort
(D) Counting Sort
Correct Answer: (A)
[EN] Cycle Sort decomposes permutations into disjoint cycles, writing each out-of-place element directly to its final slot once.
[HI] साइकिल सॉर्ट प्रत्येक तत्व को सीधे उसके अंतिम चक्र स्थान पर लिखकर सैद्धांतिक रूप से न्यूनतम संभव मेमोरी राइट्स करता है।
Q17. Within Selection Sort: Finding Minimum, In-Place Non-Stable, which selection sort metric directly maps to: "Always n(n-1)/2; strictly Theta(n^2)"?
(Selection Sort: Finding Minimum, In-Place Non-Stable में कौन सा Selection Sort Metric सीधे "Always n(n-1)/2; strictly Theta(n^2)" से संबंधित है?)
(A) Space & In-Place Nature
(B) Stability Behavior
(C) Maximum Swaps (Data Writes)
(D) Total Comparisons (All Cases)
Correct Answer: (D)
[EN] In Selection Sort: Finding Minimum, In-Place Non-Stable, 'Total Comparisons (All Cases)' handles 'Always n(n-1)/2; strictly Theta(n^2)' (Non-adaptive: ignores pre-sorted input order).
[HI] Selection Sort: Finding Minimum, In-Place Non-Stable में 'Total Comparisons (All Cases)' का कार्य/विवरण 'Always n(n-1)/2; strictly Theta(n^2)' (Non-adaptive: ignores pre-sorted input order) है।
Q18. Which option accurately describes 'Maximum Swaps (Data Writes)' in Selection Sort: Finding Minimum, In-Place Non-Stable?
(Selection Sort: Finding Minimum, In-Place Non-Stable के संदर्भ में 'Maximum Swaps (Data Writes)' की सही विशेषता कौन सी है?)
(A) Always n(n-1)/2; strictly Theta(n^2)
(B) At most n - 1 swaps; O(n) writes
(C) O(1) auxiliary space; In-Place
(D) Unstable via direct swap (e.g., [4a,4b,2])
Correct Answer: (B)
[EN] 'Maximum Swaps (Data Writes)' provides 'At most n - 1 swaps; O(n) writes' — key point: Preferred when Flash/EEPROM write cycles are costly.
[HI] 'Maximum Swaps (Data Writes)' का मुख्य विवरण 'At most n - 1 swaps; O(n) writes' है (Preferred when Flash/EEPROM write cycles are costly)।
Q19. In Selection Sort: Finding Minimum, In-Place Non-Stable, identify the correct parameter for the specification: "Unstable via direct swap (e.g., [4a,4b,2])".
(Selection Sort: Finding Minimum, In-Place Non-Stable में "Unstable via direct swap (e.g., [4a,4b,2])" विवरण किस विकल्प के लिए सही है?)
(A) Maximum Swaps (Data Writes)
(B) Space & In-Place Nature
(C) Total Comparisons (All Cases)
(D) Stability Behavior
Correct Answer: (D)
[EN] 'Stability Behavior' corresponds to 'Unstable via direct swap (e.g., [4a,4b,2])' (Long-range swap jumps over equal elements).
[HI] 'Stability Behavior' का संबंध 'Unstable via direct swap (e.g., [4a,4b,2])' (Long-range swap jumps over equal elements) से है।
Q20. Considering Selection Sort: Finding Minimum, In-Place Non-Stable, what key behavior defines 'Space & In-Place Nature'?
(Selection Sort: Finding Minimum, In-Place Non-Stable में 'Space & In-Place Nature' की मुख्य भूमिका या मान क्या है?)
(A) Unstable via direct swap (e.g., [4a,4b,2])
(B) At most n - 1 swaps; O(n) writes
(C) O(1) auxiliary space; In-Place
(D) Always n(n-1)/2; strictly Theta(n^2)
Correct Answer: (C)
[EN] 'Space & In-Place Nature' represents 'O(1) auxiliary space; In-Place' (Requires no temporary array buffer).
[HI] 'Space & In-Place Nature' का अर्थ/मान 'O(1) auxiliary space; In-Place' है (Requires no temporary array buffer)।
Selection Sort: Finding Minimum, In-Place Non-Stable — Exam FAQs
Q1: Why is Selection Sort slower than Insertion Sort on typical random inputs?
सामान्य रैंडम इनपुट पर सिलेक्शन सॉर्ट इंसर्शन सॉर्ट से धीमा क्यों होता है?
[EN] On random inputs, Insertion Sort stops shifting as soon as arr[j] <= key, averaging ~n^2/4 comparisons, whereas Selection Sort unconditionally scans the entire suffix every pass for ~n^2/2 comparisons.
[HI] रैंडम इनपुट में इंसर्शन सॉर्ट सही जगह मिलते ही लूप रोक देता है (औसत ~n^2/4 तुलनाएँ), जबकि सिलेक्शन सॉर्ट हर बार पूरा शेष एरे (~n^2/2 तुलनाएँ) स्कैन करता है।
Q2: Does Selection Sort use O(1) space even when implemented recursively?
क्या रिकर्सिव रूप में लिखने पर भी सिलेक्शन सॉर्ट O(1) स्पेस ही लेता है?
[EN] No. Standard iterative Selection Sort takes O(1) space, whereas a recursive version creates n - 1 stack frames and consumes O(n) call-stack space.
[HI] नहीं। इटरेटिव सिलेक्शन सॉर्ट O(1) स्पेस लेता है, पर रिकर्सिव सिलेक्शन सॉर्ट में n - 1 स्टैक फ्रेम बनने से O(n) अतिरिक्त स्टैक स्पेस लगता है।
Q3: When is Selection Sort actually chosen in practice?
व्यावहारिक रूप से सिलेक्शन सॉर्ट का उपयोग कब किया जाता है?
[EN] Mainly when dataset sizes are small and writing/swapping objects is extremely expensive compared to reading/comparing them, such as flash memory updates or sorting large disk/struct records by pointer.
[HI] मुख्यतः तब जब डेटा छोटा हो और तत्वों को पढ़ने की तुलना में मेमोरी में लिखना (Write/Swap) बहुत महंगा हो, जैसे Flash/EEPROM राइटिंग या बहुत बड़े रिकॉर्ड्स की स्वैपिंग।
Post a Comment
Post a Comment