One aspect of password strength testing is runs of adjacent letters on the keyboard. In this challenge, a program must be created that returns true if a string contains any runs of adjacent letters.
What counts as a run of adjacent letters?For this simplified version of a password strength tester, a run of adjacent characters is 3 or more letters which are next to each other in a single direction (left, right, above or below) on a QWERTY keyboard. For the purpose of this challenge the layout of the keyboard looks like this:
1234567890 QWERTYUIOP ASDFGHJKL ZXCVBNMIn the diagram above Q is below 1 but not below 2, so a string that contains 1qa or aq1 anywhere inside it would make the program return true, but 2qa would not.
InputThe password string to check. It will only contain the characters [0-9a-z] or [0-9A-Z] (your choice).
OutputThe program must return a truthy value if the password contains one or more runs of adjacent keys, or falsey if it contains none.
ExamplesThe following inputs should output true:
asd ytrewq ju7 abc6yhdefAnd these inputs should output false:
abc aaa qewretry zse qwdfbn pas Rules Answers may be complete programs or functions. Standard loopholes are disallowed. This is code-golf, lowest score (in bytes) wins!