From 7c8e261afdabba4c7027d2b39de5443beb7d5be2 Mon Sep 17 00:00:00 2001 From: wujing Date: Fri, 18 Jul 2025 14:28:18 +0800 Subject: [PATCH] greedy/max_capacity: fix myMax algorithm error --- 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 023819cfff..248089b2ca 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; } /* 最大容量:贪心 */