Skip to content

Commit 42bf659

Browse files
committed
comments
1 parent 08f5704 commit 42bf659

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Advanced.Algorithms/DataStructures/List/ArrayList.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void Add(T item)
8686
}
8787

8888
/// <summary>
89-
/// Insert element at specified index
89+
/// Insert given item at specified index.
9090
/// Time complexity: O(1) amortized.
9191
/// </summary>
9292
/// <param name="index">The index to insert at.<param>
@@ -110,7 +110,11 @@ private void shift(int index)
110110
Array.Copy(array, index, array, index + 1, Length - index);
111111
}
112112

113-
internal void Clear()
113+
/// <summary>
114+
/// Clears the array.
115+
/// Time complexity: O(1).
116+
/// </summary>
117+
public void Clear()
114118
{
115119
arraySize = initialArraySize;
116120
array = new T[arraySize];

0 commit comments

Comments
 (0)