Closed abhayjoshi201 closed 1 month ago
👋 Thanks for opening this issue! First please star the repository and follow me in github. We appreciate your feedback and will look into it as soon as possible.
Done!
Hello @abhayjoshi201! Your issue #163 has been successfully closed. ✅ Thank you for your contribution and helping us improve the project! If you have any more ideas or run into other issues, feel free to open a new one. Happy coding! 🚀
🟢 Title: Longest Square Streak in Array 🟢 Programming Language: C++ 🟢 Objective: To find the length of the longest square streak in an array. A square streak is defined as a subsequence where each element (after sorting) is the square of the previous element, and the length of the subsequence is at least 2. If no such streak exists, return -1.
🟢 Summary: This solution finds the longest square streak by utilizing a bitset for fast lookups. The algorithm iterates over each element, checking if subsequent squares are present. It updates the maximum streak length if a longer one is found and returns -1 if no valid streak exists.
✅ Details to Include When Taking the Issue: Name: Abhay Joshi