3 ms·Sort of. Store the squares in a hash map with the value used to indicate whether you've already seen it.by thewarrior 12y agoSort of. Store the squares in a hash map with the value used to indicate whether you've already seen it.