title: Find all perfect squares that are a permutation of some 300 digits
body: <p>This was a question that was asked to my friend in a Google interview a while back. He was unable to come up with a solution but ended up bagging the job anyway. Here's the question</p>
  
  <blockquote>
    <p>You have been given 300 digits comprising of 100 ones, 100 twos, and 100 threes, now come up with an algorithm that will determine all such numbers which are a perfect square</p>
  </blockquote>
  
  <p>I tried this for a while but am stumped. Any thoughts on how to go about this?</p>