What do you mean when you say it doesn't support non-breaking spaces? Just wrap it in a code tag and it works fine.
Aha - the non-breaking space has to be followed by a space, for it to be recognized! That's certainly weird.
The author used Python for his example and suggested using a Dict to solve the first problem, so presumably we have the Standard Python Library at our disposal:
from collections import Counter
def get_mode(nums): return Counter(nums).most_common(1)
This will give the mode and the count. I don't think the author's solution (14 lines) would get you the job!
Normally, I wouldn't make it one line, but the Slashdot Editor Window doesn't seem to support a proper code block and also doesn't support non-breakings spaces.
True story - my brother and I were at a financial services institution to take care of my mother's accounts when her Alzheimer's took over. So, he's creating a password and the system wouldn't take it -- it kept giving an obvious database error (not something that would normally be shown to an end-user). He showed me what he was typing and it contained a single-quote, something like "Mom's account". I told him to take out the single quote and it was happy.
I insisted that the representative get their developers on the phone, immediately, which she did, and then I had her relay my concerns about their obviously vulnerable design.
... The letters of many programs are fuzzy
I think I can help with this one. Open the properties dialog for the executable (or shortcut) of that program. Click on the Compatibility tab and check the box for "Disable display scaling on high DPI settings".
I just watched this tonight with a lady friend. I was bored enough to browse
Wow - you just casually admit to this? For the sake of others, please never do this again. There's a reason that theaters run the little public service announcements about turning off your phone before the movie. This should be a standard question on a test designed to identify sociopaths: "If you bored while watching a movie in a theater, do you a) suffer silently, b) leave the theater, or c) ignore the rest of the people in the theater that have paid to watch the movie and pull out your phone."
In 1750 Issac Newton became discouraged when he fell up a flight of stairs.