Skip to content

Commit f5d3897

Browse files
hop-along-pollymairaw
authored andcommitted
Standardize Big O Notation for (#3296)
- ArrayList - BitArray - CollectionBase - DictionaryBase - Hashtable - ReadOnlyCollectionBase - Sortedlist - Stack
1 parent d5baba0 commit f5d3897

File tree

9 files changed

+249
-249
lines changed

9 files changed

+249
-249
lines changed

xml/System.Collections/ArrayList.xml

Lines changed: 53 additions & 53 deletions
Large diffs are not rendered by default.

xml/System.Collections/BitArray.xml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
<format type="text/markdown"><![CDATA[
130130
131131
## Remarks
132-
This constructor is an O(`n`) operation, where `n` is the number of elements in `values`.
132+
This constructor is an `O(n)` operation, where `n` is the number of elements in `values`.
133133
134134
]]></format>
135135
</remarks>
@@ -176,7 +176,7 @@
176176
## Remarks
177177
The first byte in the array represents bits 0 through 7, the second byte represents bits 8 through 15, and so on. The Least Significant Bit of each byte represents the lowest index value: " `bytes` [0] & 1" represents bit 0, " `bytes` [0] & 2" represents bit 1, " `bytes` [0] & 4" represents bit 2, and so on.
178178
179-
This constructor is an O(`n`) operation, where `n` is the number of elements in `bytes`.
179+
This constructor is an `O(n)` operation, where `n` is the number of elements in `bytes`.
180180
181181
]]></format>
182182
</remarks>
@@ -222,7 +222,7 @@
222222
<format type="text/markdown"><![CDATA[
223223
224224
## Remarks
225-
This constructor is an O(`n`) operation, where `n` is the number of elements in `bits`.
225+
This constructor is an `O(n)` operation, where `n` is the number of elements in `bits`.
226226
227227
]]></format>
228228
</remarks>
@@ -267,7 +267,7 @@
267267
<format type="text/markdown"><![CDATA[
268268
269269
## Remarks
270-
This constructor is an O(`n`) operation, where `n` is `length`.
270+
This constructor is an `O(n)` operation, where `n` is `length`.
271271
272272
]]></format>
273273
</remarks>
@@ -314,7 +314,7 @@
314314
## Remarks
315315
The number in the first `values` array element represents bits 0 through 31, the second number in the array represents bits 32 through 63, and so on. The Least Significant Bit of each integer represents the lowest index value: " `values` [0] & 1" represents bit 0, " `values` [0] & 2" represents bit 1, " `values` [0] & 4" represents bit 2, and so on.
316316
317-
This constructor is an O(`n`) operation, where `n` is the number of elements in `values`.
317+
This constructor is an `O(n)` operation, where `n` is the number of elements in `values`.
318318
319319
]]></format>
320320
</remarks>
@@ -362,7 +362,7 @@
362362
<format type="text/markdown"><![CDATA[
363363
364364
## Remarks
365-
This constructor is an O(`n`) operation, where `n` is `length`.
365+
This constructor is an `O(n)` operation, where `n` is `length`.
366366
367367
]]></format>
368368
</remarks>
@@ -413,7 +413,7 @@
413413
## Remarks
414414
The bitwise AND operation returns `true` if both operands are `true`, and returns `false` if one or both operands are `false`.
415415
416-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
416+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
417417
418418
419419
@@ -475,7 +475,7 @@
475475
476476
In contrast, a deep copy of a collection copies the elements and everything directly or indirectly referenced by the elements.
477477
478-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
478+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
479479
480480
]]></format>
481481
</remarks>
@@ -527,7 +527,7 @@
527527
528528
This method uses <xref:System.Array.Copy%2A?displayProperty=nameWithType> to copy the elements.
529529
530-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
530+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
531531
532532
533533
@@ -594,7 +594,7 @@
594594
## Remarks
595595
<xref:System.Collections.BitArray.Length%2A> and <xref:System.Collections.BitArray.Count%2A> return the same value. <xref:System.Collections.BitArray.Length%2A> can be set to a specific value, but <xref:System.Collections.BitArray.Count%2A> is read-only.
596596
597-
Retrieving the value of this property is an O(1) operation.
597+
Retrieving the value of this property is an `O(1)` operation.
598598
599599
]]></format>
600600
</remarks>
@@ -641,7 +641,7 @@
641641
<format type="text/markdown"><![CDATA[
642642
643643
## Remarks
644-
This method is an O(1) operation.
644+
This method is an `O(1)` operation.
645645
646646
647647
@@ -717,7 +717,7 @@
717717
718718
The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.
719719
720-
This method is an O(1) operation.
720+
This method is an `O(1)` operation.
721721
722722
]]></format>
723723
</remarks>
@@ -765,7 +765,7 @@
765765
766766
A collection that is read-only is simply a collection with a wrapper that prevents modifying the collection; therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.
767767
768-
This method is an O(1) operation.
768+
This method is an `O(1)` operation.
769769
770770
]]></format>
771771
</remarks>
@@ -822,7 +822,7 @@
822822
[!code-csharp[Classic BitArray Example#2](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic BitArray Example/CS/source2.cs#2)]
823823
[!code-vb[Classic BitArray Example#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic BitArray Example/VB/source2.vb#2)]
824824
825-
This method is an O(1) operation.
825+
This method is an `O(1)` operation.
826826
827827
]]></format>
828828
</remarks>
@@ -874,7 +874,7 @@
874874
875875
The C# language uses the [this](~/docs/csharp/language-reference/keywords/this.md) keyword to define the indexers instead of implementing the <xref:System.Collections.BitArray.Item%2A> property. Visual Basic implements <xref:System.Collections.BitArray.Item%2A> as a default property, which provides the same indexing functionality.
876876
877-
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
877+
Retrieving the value of this property is an `O(1)` operation; setting the property is also an `O(1)` operation.
878878
879879
]]></format>
880880
</remarks>
@@ -963,7 +963,7 @@
963963
964964
If <xref:System.Collections.BitArray.Length%2A> is set to a value that is greater than <xref:System.Collections.BitArray.Count%2A>, the new elements are set to `false`.
965965
966-
Retrieving the value of this property is an O(1) operation. Setting this property is an O(`n`) operation.
966+
Retrieving the value of this property is an `O(1)` operation. Setting this property is an `O(n)` operation.
967967
968968
]]></format>
969969
</remarks>
@@ -1008,7 +1008,7 @@
10081008
<format type="text/markdown"><![CDATA[
10091009
10101010
## Remarks
1011-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
1011+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
10121012
10131013
10141014
@@ -1066,7 +1066,7 @@
10661066
## Remarks
10671067
The bitwise OR operation returns `true` if one or both operands are `true`, and returns `false` if both operands are `false`.
10681068
1069-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
1069+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
10701070
10711071
10721072
@@ -1160,7 +1160,7 @@
11601160
<format type="text/markdown"><![CDATA[
11611161
11621162
## Remarks
1163-
This method is an O(1) operation.
1163+
This method is an `O(1)` operation.
11641164
11651165
11661166
@@ -1221,7 +1221,7 @@
12211221
<format type="text/markdown"><![CDATA[
12221222
12231223
## Remarks
1224-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
1224+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
12251225
12261226
12271227
@@ -1287,7 +1287,7 @@
12871287
[!code-csharp[Classic BitArray Example#2](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic BitArray Example/CS/source2.cs#2)]
12881288
[!code-vb[Classic BitArray Example#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic BitArray Example/VB/source2.vb#2)]
12891289
1290-
Retrieving the value of this property is an O(1) operation.
1290+
Retrieving the value of this property is an `O(1)` operation.
12911291
12921292
]]></format>
12931293
</remarks>
@@ -1470,7 +1470,7 @@
14701470
## Remarks
14711471
The bitwise exclusive OR operation returns `true` if exactly one operand is `true`, and returns `false` if both operands have the same Boolean value.
14721472
1473-
This method is an O(`n`) operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
1473+
This method is an `O(n)` operation, where `n` is <xref:System.Collections.BitArray.Count%2A>.
14741474
14751475
14761476

0 commit comments

Comments
 (0)