mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-24 18:55:36 +08:00
Publish the C codes to the docs. (#469)
This commit is contained in:
@ -157,7 +157,10 @@ $$
|
||||
=== "C"
|
||||
|
||||
```c title=""
|
||||
|
||||
// (i + j) 有可能超出 int 的取值范围
|
||||
int m = (i + j) / 2;
|
||||
// 更换为此写法则不会越界
|
||||
int m = i + (j - i) / 2;
|
||||
```
|
||||
|
||||
=== "C#"
|
||||
|
Reference in New Issue
Block a user