Hey all, working through the Frequency Sort problem, and unsure why my solution gives incorrect output for certain inputs. It SEEMS logically equivalent to the solution given in the guide, but something is apparently amiss:
My Solution
Output:
Thanks!