mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08: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:
@ -87,9 +87,7 @@ public class time_complexity {
|
||||
for (int j = 0; j < i; j++) {
|
||||
if (nums[j] > nums[j + 1]) {
|
||||
// 交换 nums[j] 与 nums[j + 1]
|
||||
int tmp = nums[j];
|
||||
nums[j] = nums[j + 1];
|
||||
nums[j + 1] = tmp;
|
||||
(nums[j + 1], nums[j]) = (nums[j], nums[j + 1]);
|
||||
count += 3; // 元素交换包含 3 个单元操作
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user