# Find the index of a 0 to replace to maximize the length of continuous ones

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/1118/index-of-zero-replace-max-length-continuous-ones
Source observed: 2026-11-05T02:35:39.877Z
Last checked: 2026-11-05T02:35:39.877+00:00
Indexed: 2026-11-07T03:47:25.225+00:00

---

# Find the index of a 0 to replace to maximize the length of continuous ones

We publish this question in our coding-question collection. It asks you to find the index of a `0` whose replacement maximizes the length of a continuous run of `1`s.

## Community answers

No answers have been contributed by the community yet.

## Your answer

Sign in or create an account to answer this question. Submitting an answer marks the question complete.

- [Log in](https://www.aced.io/login?src=nav)
- [Sign up](https://www.aced.io/signup?src=nav&returnPath=/questions/1118/index-of-zero-replace-max-length-continuous-ones)

## Related Aced resources

We provide interview preparation for several technical and professional areas:

- [Coding Questions](https://www.aced.io/questions?type=algorithms&filterBy=codeEditor&src=nav)
- [Software Engineering](https://www.aced.io/courses/software-engineering?src=nav) — Learn strategies for coding problems and more.
- [System Design](https://www.aced.io/courses/system-design-interviews?src=nav) — Define architectures, interfaces, and databases in a time crunch.
- [SQL Questions](https://www.aced.io/questions?type=sql&filterBy=codeEditor&src=nav)
- [Machine Learning](https://www.aced.io/questions?role=ml-engineer&type=machine-learning&type=concept&src=nav)
- [Data Engineering](https://www.aced.io/questions?role=data-engineer&type=data-pipeline-design&type=system-design&type=sql&type=data-modeling&src=nav)
- [All Questions](https://www.aced.io/questions)

Our broader offerings include [interview courses](https://www.aced.io/courses?src=nav), [Loops](https://www.aced.io/guides?src=nav), [Experiences](https://www.aced.io/experiences?src=nav), [Practice](https://www.aced.io/practice?src=nav), [Coaching](https://www.aced.io/coaching?src=nav), and [Pricing](https://www.aced.io/upgrade?src=nav). We are Aced, formerly Exponent: [Aced home](https://www.aced.io/?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%2F1118%2Findex-of-zero-replace-max-length-continuous-ones&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%2F1118%2Findex-of-zero-replace-max-length-continuous-ones). Opening a form does not execute a tool.