Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longest Square Streak in an Array #154

Open
Avnee29 opened this issue Oct 28, 2024 · 0 comments
Open

Longest Square Streak in an Array #154

Avnee29 opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels

Comments

@Avnee29
Copy link

Avnee29 commented Oct 28, 2024

You are given an integer array nums. A subsequence of nums is called a square streak if:

The length of the subsequence is at least 2, and
after sorting the subsequence, each element (except the first element) is the square of the previous number.

Return the length of the longest square streak in nums, or return -1 if there is no square streak.
A subsequence is an array that can be derived from another array by deleting some or no elements without changing the order of the remaining elements.
 Please assign me this isssue under Hactoberfest 2024.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants