Generate all valid squares quickly, then O(1) lookup.

Max ops is guaranteed to be magnitudes beyond 50K, so solution was guaranteed to work.

```
HashSet<Integer> squares = new HashSet<Integer>();
for(int i=1;i<50000;i++){
int n = i*i;
if(n > 0)
squares.add(n);
else
break;
}
return squares.contains(num);```
```