mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-13 07:46:06 +00:00
Update C# code.
This commit is contained in:
@@ -419,7 +419,7 @@ $$
|
||||
=== "C#"
|
||||
|
||||
```csharp title=""
|
||||
// (i + j) 有可能超出 int 的取值范围
|
||||
// (i + j) 有可能超出 int 的取值范围
|
||||
int m = (i + j) / 2;
|
||||
// 更换为此写法则不会越界
|
||||
int m = i + (j - i) / 2;
|
||||
|
||||
Reference in New Issue
Block a user