deno.land / x / masx200_leetcode_test@10.6.5 / sort-the-people / index.ts
123456789export default function sortPeople( names: string[], heights: number[],): string[] { return [...names.entries()].sort((a, b) => -(heights[a[0]] ?? 0) + (heights[b[0]] ?? 0) ).map((a) => a[1]);}
Version Info