For loop + Hashset  Solution + Explanation ✅ | TC: O(n), SC: O(n) 🚀  (UPVOTE PLS)
Intuition\nThe problem is about finding the longest sequence of numbers such that each number in the sequence is the square of the previous one. Since a direct 
## Intuition\nThe problem is about finding the longest sequence of numbers such that each number in the sequence is the square of the previous one. Since a direct approach could involve a lot of redundant checks, it makes sense to store numbers in a set for efficient lookup. By focusing only on numbers that are the starting points of potential sequences, we avoid unnecessary calculations and improve the solution\u2019s efficiency.\n\n## Approach\n1. **Convert List to Set**: First, we convert the list `nums` into a set to allow O(1) time complexity for lookups, which makes it easy to check if the square of a number is present.\n2. **Identify Starting Points**: For each number, check if it is a potential start of a streak by verifying that its square root is not in the set (since if it was, the current number would be part of a previous streak).\n3. **Extend the Streak**: Starting from each identified base, keep squaring the number and incrementing the streak length until the squared number is no longer in the set.\n4. **Update the Longest Streak**: Track the longest streak encountered. If no streaks longer than 1 are found, return -1 as required by the problem statement.\n\n## Complexity\n- **Time Complexity**: $$O(n)$$, where \\( n \\) is the number of elements in `nums`. Each element is processed once as part of extending its streak or skipping when it\'s not a potential start.\n- **Space Complexity**: $$O(n)$$ due to the storage of `nums` in a set.\n\n\n# Code\n```python3 []\nclass Solution:\n    def longestSquareStreak(self, nums: List[int]) -> int:\n        \n\n        nums = set(nums)\n\n        max_streak = 0\n\n        for num in nums:\n            if (num ** .5) in nums:\n                continue\n\n            cur_streak = 1\n            goal = num ** 2\n            while True:\n                if goal in nums:\n                    cur_streak +=1\n                    goal **= 2\n                else:\n                    break\n\n            max_streak = max(max_streak, cur_streak)\n        \n        if max_streak == 1:\n            return -1\n\n        return max_streak\n\n```
['Hash Table', 'Python3']