From e9bb66a61eb4d609c568ebd5b85a3a0a7e93b09d Mon Sep 17 00:00:00 2001 From: Kevin Sheng Date: Fri, 3 Jan 2025 21:28:41 -0800 Subject: [PATCH] typo --- content/3_Silver/Sorting_Custom.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/3_Silver/Sorting_Custom.mdx b/content/3_Silver/Sorting_Custom.mdx index fae90a8b12..e7557893b3 100644 --- a/content/3_Silver/Sorting_Custom.mdx +++ b/content/3_Silver/Sorting_Custom.mdx @@ -150,7 +150,7 @@ In C++, its comparators must obey a set of behaviors. Let's call this comparator `compare`, and the objects it compares `x` and `y`. - If `x` is less than `y`, return `true`. -- If `y` is greater than *or equal to* `y`, return `false`. +- If `x` is greater than *or equal to* `y`, return `false`. - If `compare(x, y)` is `true`, then `compare(y, x)` must be false. (antisymmetry) - If `compare(x, y)` is `true` and `compare(y, z)` is `true`, then `compare(x, z)` must be true. (transitivity) @@ -249,7 +249,7 @@ Let's call this comparator `compare`, and the objects it compares `x` and `y`. For `compare` to be valid, the following must be true: - If `x` is less than `y`, return `-1`. -- If `y` is greater than `y`, return `1`. +- If `x` is greater than `y`, return `1`. - If the two are equal, return `0`. - If `compare(x, y) > 0`, then `compare(y, x) < 0`. (antisymmetry) - If `compare(x, y) > 0` and `compare(y, z) > 0`, then `compare(x, z) > 0`. (transitivity) @@ -386,7 +386,7 @@ Let's call this comparator `compare`, and the objects it compares `x` and `y`. For `compare` to be valid, the following must be true: - If `x` is less than `y`, return `-1`. -- If `y` is greater than `y`, return `1`. +- If `x` is greater than `y`, return `1`. - If the two are equal, return `0`. - If `compare(x, y) > 0`, then `compare(y, x) < 0`. (antisymmetry) - If `compare(x, y) > 0` and `compare(y, z) > 0`, then `compare(x, z) > 0`. (transitivity)