Another XKCD inspired competition. This one is based on Keyboard Mash.
Given a input string, identify the anomalous characters, assuming that the majority have been typed on a single row of the standard US QWERTY keyboard. Input strings can contain shifted key strokes, but they will not contain carriage returns (Enter), CTRL/ALT affected characters, spaces, tabs and backspaces (because that would be silly). The number pad will not be considered as part of the keyboard for this challenge.
The challenge is to output the characters that aren't on the same keyboard row as the majority of individual characters in the single string. The output should contain each anomalous character only once and no other characters.
In the case of a equal count of anomalous characters across two or more rows, the tie break is determined in this order:
- Shortest unique list
- Top most row
A string through either STDIN, ARGV or a function parameter
A string to STDOUT or a function return. It should have each anomalous character only once, but does not need to be ordered.
Topmost row list returned
Shortest unique list returned
Topmost shortest list returned
This is code golf, so shortest entry wins.