HF RL Explorer

Task: Implement Python's cmp to key Function from Scratch

Task: Implement Python's cmp to key Function from Scratch: a task in Terminal-Lego-15k (Harbor dataset). Python's functools.cmp to key function converts a comparison function (that takes two arguments and returns -1, 0, or 1) into a key function suitable for use with sorted() , min() , max() , etc.

The task

Python's `functools.cmp_to_key` function converts a comparison function (that takes two arguments and returns -1, 0, or 1) into a key function suitable for use with `sorted()`, `min()`, `max()`, etc.

Part of PrimeIntellect/Terminal-Lego-15k.