8000 Corrected and simplified `Array.Sort` and `List<T>.Sort` time complex… · CAndRyan/dotnet-api-docs@4e7d674 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4e7d674

Browse files
Corrected and simplified Array.Sort and List<T>.Sort time complexity remarks. (dotnet#4194)
Co-authored-by: Mislav Čovran <mislav.covran@visor.hr>
1 parent 866dbb2 commit 4e7d674

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

xml/System.Collections.Generic/List`1.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,7 @@ Public Function StartsWith(e As Employee) As Boolean
36713671
36723672
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
36733673
3674-
On average, this method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>; in the worst case it is an O(*n*<sup>2</sup>) operation.
3674+
This method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
36753675
36763676
36773677
@@ -3756,7 +3756,7 @@ Public Function StartsWith(e As Employee) As Boolean
37563756
37573757
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
37583758
3759-
On average, this method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>; in the worst case it is an O(*n*<sup>2</sup>) operation.
3759+
This method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
37603760
37613761
37623762
@@ -3836,7 +3836,7 @@ Public Function StartsWith(e As Employee) As Boolean
38363836
38373837
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
38383838
3839-
On average, this method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>; in the worst case it is an O(*n*<sup>2</sup>) operation.
3839+
This method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
38403840
38413841
38423842
@@ -3924,7 +3924,7 @@ Public Function StartsWith(e As Employee) As Boolean
39243924
39253925
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
39263926
3927-
On average, this method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>; in the worst case it is an O(*n*<sup>2</sup>) operation.
3927+
This method is an O(*n* log *n*) operation, where *n* is <xref:System.Collections.Generic.List%601.Count%2A>.
39283928
39293929
39303930

xml/System/Array.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7405,7 +7405,7 @@ int[,,] TDArray = new int[1,1,1];
74057405

74067406
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
74077407

7408-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
7408+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
74097409

74107410

74117411

@@ -7499,7 +7499,7 @@ int[,,] TDArray = new int[1,1,1];
74997499

75007500
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
75017501

7502-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `keys`.
7502+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `keys`.
75037503

75047504

75057505

@@ -7597,7 +7597,7 @@ int[,,] TDArray = new int[1,1,1];
75977597

75987598
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
75997599

7600-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
7600+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
76017601

76027602
The .NET Framework includes predefined <xref:System.Collections.IComparer> implementations listed in the following table.
76037603

@@ -7725,7 +7725,7 @@ int[,,] TDArray = new int[1,1,1];
77257725

77267726
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
77277727

7728-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `keys`.
7728+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `keys`.
77297729

77307730

77317731

@@ -7829,7 +7829,7 @@ int[,,] TDArray = new int[1,1,1];
78297829

78307830
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
78317831

7832-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
7832+
This method is an O(`n` log `n`) operation, where `n` is `length`.
78337833

78347834

78357835

@@ -7935,7 +7935,7 @@ int[,,] TDArray = new int[1,1,1];
79357935

79367936
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
79377937

7938-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
7938+
This method is an O(`n` log `n`) operation, where `n` is `length`.
79397939

79407940

79417941

@@ -8061,7 +8061,7 @@ int[,,] TDArray = new int[1,1,1];
80618061

80628062
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
80638063

8064-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
8064+
This method is an O(`n` log `n`) operation, where `n` is `length`.
80658065

80668066

80678067

@@ -8196,7 +8196,7 @@ int[,,] TDArray = new int[1,1,1];
81968196

81978197
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
81988198

8199-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
8199+
This method is an O(`n` log `n`) operation, where `n` is `length`.
82008200

82018201

82028202

@@ -8317,7 +8317,7 @@ int[,,] TDArray = new int[1,1,1];
83178317

83188318
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
83198319

8320-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
8320+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
83218321

83228322

83238323

@@ -8413,7 +8413,7 @@ int[,,] TDArray = new int[1,1,1];
84138413

84148414
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
84158415

8416-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
8416+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
84178417

84188418

84198419

@@ -8510,7 +8510,7 @@ int[,,] TDArray = new int[1,1,1];
85108510

85118511
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
85128512

8513-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
8513+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
85148514

85158515

85168516

@@ -8612,7 +8612,7 @@ int[,,] TDArray = new int[1,1,1];
86128612

86138613
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
86148614

8615-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
8615+
This method is an O(`n` log `n`) operation, where `n` is `length`.
86168616

86178617

86188618

@@ -8723,7 +8723,7 @@ int[,,] TDArray = new int[1,1,1];
87238723

87248724
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
87258725

8726-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
8726+
This method is an O(`n` log `n`) operation, where `n` is `length`.
87278727

87288728

87298729

@@ -8840,7 +8840,7 @@ int[,,] TDArray = new int[1,1,1];
88408840

88418841
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
88428842

8843-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
8843+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
88448844

88458845

88468846

@@ -8957,7 +8957,7 @@ int[,,] TDArray = new int[1,1,1];
89578957

89588958
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
89598959

8960-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
8960+
This method is an O(`n` log `n`) operation, where `n` is the <xref:System.Array.Length%2A> of `array`.
89618961

89628962

89638963

@@ -9084,7 +9084,7 @@ int[,,] TDArray = new int[1,1,1];
90849084

90859085
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
90869086

9087-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
9087+
This method is an O(`n` log `n`) operation, where `n` is `length`.
90889088

90899089

90909090

@@ -9221,7 +9221,7 @@ int[,,] TDArray = new int[1,1,1];
92219221

92229222
This implementation performs an unstable sort; that is, if two elements are equal, their order might not be preserved. In contrast, a stable sort preserves the order of elements that are equal.
92239223

9224-
For arrays that are sorted by using the Heapsort and Quicksort algorithms, in the worst case, this method is an O(`n` log `n`) operation, where `n` is `length`.
9224+
This method is an O(`n` log `n`) operation, where `n` is `length`.
92259225

92269226

92279227

0 commit comments

Comments
 (0)
0