[Python 3] Simple | Using set
\nclass Solution:\n    def longestSquareStreak(self, nums: List[int]) -> int:\n        uniq = set(nums)\n        res = 0\n        \n        for i in nums:\n    
```\nclass Solution:\n    def longestSquareStreak(self, nums: List[int]) -> int:\n        uniq = set(nums)\n        res = 0\n        \n        for i in nums:\n            temp = i\n            t = 0\n            while temp * temp in uniq:\n                temp *= temp\n                t += 1\n            \n            res = max(res, t)\n        \n        return res + 1 if res else -1\n```
['Ordered Set', 'Python', 'Python3']