diff --git a/content/3_Silver/Sorting_Custom.mdx b/content/3_Silver/Sorting_Custom.mdx index edd9e6127f..45463a7814 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) @@ -388,7 +388,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)