Results for “comparison”
Small, practical examples. Search by task or narrow things down below.
List unordered pairs without duplicate reversals
SQL: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQL✓ Tested
List unordered pairs without duplicate reversals
SQL Server: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQL Server✓ Tested
List unordered pairs without duplicate reversals
Postgres: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
Postgres✓ Tested
List unordered pairs without duplicate reversals
SQLite: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQLite✓ Tested
Normalize canonically equivalent Unicode strings
C#: Normalize to NFC before an ordinal comparison of equivalent character sequences.
C#✓ Tested
Return all rows tied for the maximum in a group
SQL: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL✓ Tested
Return all rows tied for the maximum in a group
SQL Server: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQL Server✓ Tested
Return all rows tied for the maximum in a group
Postgres: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
Postgres✓ Tested
Return all rows tied for the maximum in a group
SQLite: An equality comparison with a grouped maximum retains ties rather than choosing one arbitrary row.
SQLite✓ Tested
Search a sorted array efficiently
C#: Array.BinarySearch requires an array sorted with the same comparison rules.
C#✓ Tested
Sort an integer array with qsort
C: The comparator uses relational comparisons to avoid subtraction overflow.
C✓ Tested
Sort records by two fields
C++: Tuple comparison implements lexicographic ordering across several keys.
C++✓ Tested