# Find the longest alternating subsequence.

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/1173/longest-alternating-subsequence
Source observed: 2026-11-04T23:11:13.983Z
Last checked: 2026-11-04T23:11:13.983+00:00
Indexed: 2026-11-06T04:10:01.722+00:00

---

# Find the longest alternating subsequence.

[All Questions](https://www.aced.io/questions)

This is a coding question in our public question library. It asks you to find the longest alternating subsequence. The supplied question text does not include the input format, expected output, examples, constraints, or a solution.

## Community answers

No answers have been contributed by the community yet.

## Related questions

- [Find the longest increasing subsequence.](https://www.aced.io/questions/1125/longest-increasing-subsequence)
- [Find the longest repeating substring.](https://www.aced.io/questions/1170/longest-repeating-substring)
- [Longest Increasing Subsequence](https://www.aced.io/questions/5245/coding-longest-increasing-subsequence)

## Your answer

To submit an answer, log in or sign up. Submitting marks this question complete.

Aced, formerly Exponent, provides interview preparation through courses, interview questions, practice, and coaching. Its navigation includes preparation for product management, software engineering, system design, data science, machine learning, data engineering, and other roles. Relevant links include [Coding Questions](https://www.aced.io/questions?type=algorithms&filterBy=codeEditor&src=nav), [Practice](https://www.aced.io/practice?src=nav), [Courses](https://www.aced.io/courses?src=nav), and [Coaching](https://www.aced.io/coaching?src=nav).

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F1173%2Flongest-alternating-subsequence&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F1173%2Flongest-alternating-subsequence). Opening a form does not execute a tool.