Run this in the command line:
deno run main.js
main.js
is three different ways of top-k-frequent-elements implementation.
- use Array
- use
deno_std
BinaryHeap - use npm package Heap
But the deno_std
BinaryHeap seems has a different result.It also cannot pass all the leetcode test cases.