fix(csharp): reformat csharp codes and docs (#652)

* fix(csharp): reformat the C# codes and docs

* Update time_complexity.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
hpstory
2023-07-24 19:50:00 +08:00
committed by GitHub
parent 1777a16865
commit 978d3c2ed7
13 changed files with 47 additions and 77 deletions

View File

@ -45,7 +45,7 @@ public class list {
/* 通过索引遍历列表 */
int count = 0;
for (int i = 0; i < list.Count(); i++) {
for (int i = 0; i < list.Count; i++) {
count++;
}

View File

@ -87,7 +87,7 @@ class MyList {
/* 列表扩容 */
public void extendCapacity() {
// 新建一个长度为 numsCapacity * extendRatio 的数组,并将原数组拷贝到新数组
System.Array.Resize(ref nums, numsCapacity * extendRatio);
Array.Resize(ref nums, numsCapacity * extendRatio);
// 更新列表容量
numsCapacity = nums.Length;
}