[Python / JS] dont use expensive sqrt() function
Python\n\nclass Solution:\n    def longestSquareStreak(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        seen = {}\n        ans = -1\n\n 
# Python\n```\nclass Solution:\n    def longestSquareStreak(self, nums: List[int]) -> int:\n        nums.sort(reverse=True)\n        seen = {}\n        ans = -1\n\n        for n in nums:\n            if n*n in seen:\n                seen[n] = seen[n*n]+1\n                ans = max(ans, seen[n])\n            else:\n                seen[n] = 1\n\n        return ans\n```\n# JavaScript\n```\nconst longestSquareStreak = nums => {\n    nums.sort((a,b) => b-a)\n    const seen = new Map()\n    let ans = -1\n\n    for (let n of nums) {\n        if (seen.has(n*n)) {\n            seen.set(n, seen.get(n*n) + 1)\n            ans = Math.max(ans, seen.get(n))\n        } else {\n            seen.set(n, 1)\n        }\n    }\n\n    return ans\n}\n```
['Python', 'Python3', 'JavaScript']