Highest Rank Number in an Array
Last updated
Was this helpful?
Last updated
Was this helpful?
count numbers through 'reduce', set init value 'Map' and reducing it
convert as array [[key, value], [key, value]...]
sort by value (order by desc), if value same sort by key (order by desc)
return process-3's first value set's key
which means array[0][0]
please don't be mad, it's just for fun.
if it's for work I would never wrote like this.
I very care about readability