mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-08 13:36:06 +00:00
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:
@@ -539,15 +539,13 @@
|
||||
```csharp title="list.cs"
|
||||
/* 通过索引遍历列表 */
|
||||
int count = 0;
|
||||
for (int i = 0; i < list.Count(); i++)
|
||||
{
|
||||
for (int i = 0; i < list.Count; i++) {
|
||||
count++;
|
||||
}
|
||||
|
||||
/* 直接遍历列表元素 */
|
||||
count = 0;
|
||||
foreach (int n in list)
|
||||
{
|
||||
foreach (int n in list) {
|
||||
count++;
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user