title: Filter numbers from an array which share the same digit without knowing the digit beforehand
body: <p>I'm looking for an easy way to do the following:
  I have an array of random numbers between 0-99. I need two arrays, first which have values which share the same first digit, second for values that share the same second digit. It doesn't matter what that digit is, as long as it occurs more than once. 0-9 is to be treated as if the first digit was 0.</p>
  <p>To illustrate the problem:
  <code>[0, 10, 20, 11, 19, 12, 54, 64, 23, 24]</code> would result in <code>[10, 11, 12, 19, 23, 24]</code> and <code>[0, 10, 20, 24, 54, 64]</code>. Some values can go in both arrays if they meet the criteria.</p>
  <p>I've found solutions that are useful if you know the digit you're comparing. However, not in this scenario.</p>
  <p>I know the way to begin is to convert numbers inside the array into strings: <code>array.map(String)</code>, so that the second and first digit can be accessed by <code>first[0]</code>, <code>second[1]</code>. I don't know how to proceed from there, though. Any ideas are greatly appreciated.</p>