Created
September 3, 2025 00:45
-
-
Save AbeEstrada/8b9085d129371133860ac22c3cfb5737 to your computer and use it in GitHub Desktop.
Exercise: Big Sorting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function bigSorting(unsorted) { | |
return unsorted.sort((a,b) => { | |
const bigA = BigInt(a); | |
const bigB = BigInt(b); | |
if (bigA < bigB) return -1; | |
if (bigA > bigB) return 1; | |
return 0; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment