deno.land / x / masx200_leetcode_test@10.6.5 / sort-array-by-parity / index.ts
12345678import { groupBy } from "../deps.ts";
export default function sortArrayByParity(nums: number[]): number[] { return Object.values( groupBy(nums, (a) => Number(a % 2)), ).flat() as number[];}
Version Info