From 83a806a6023d5ad6f8e94283627e50e17c77fc6e Mon Sep 17 00:00:00 2001 From: WuJing <178955347@qq.com> Date: Mon, 21 Jul 2025 15:12:34 +0800 Subject: [PATCH] greedy/max_capacity: fix myMax algorithm error (#1784) Co-authored-by: wujing --- codes/c/chapter_greedy/max_capacity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/c/chapter_greedy/max_capacity.c b/codes/c/chapter_greedy/max_capacity.c index 023819cff..248089b2c 100644 --- a/codes/c/chapter_greedy/max_capacity.c +++ b/codes/c/chapter_greedy/max_capacity.c @@ -12,7 +12,7 @@ int myMin(int a, int b) { } /* 求最大值 */ int myMax(int a, int b) { - return a < b ? a : b; + return a > b ? a : b; } /* 最大容量:贪心 */