# Sort a binary array in linear time. — Aced (formerly Exponent)

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/971/sort-binary-array-linear-time
Source observed: 2026-11-05T00:06:11.497Z
Last checked: 2026-11-05T00:06:11.497+00:00
Indexed: 2026-11-06T20:11:12.746+00:00

---

# Sort a binary array in linear time.

We provide interview-preparation courses, practice questions, interview experiences, and coaching through Aced (formerly Exponent). This question is part of our **Data Structures & Algorithms** and **Coding** collections.

## Question details

- **Question:** Sort a binary array in linear time.
- **Reported last asked:** 6 months ago
- **Roles:** [Software Engineer](https://www.aced.io/questions?role=swe) (4), [Forward Deployed Engineer](https://www.aced.io/questions?role=forward-deployed-engineer)
- **Companies associated with this question:** [Amazon](https://www.aced.io/questions?company=amazon) (2), [Accenture](https://www.aced.io/questions?company=accenture), [Lyft](https://www.aced.io/questions?company=lyft), [Anduril](https://www.aced.io/questions?company=anduril), [Apple](https://www.aced.io/questions?company=apple), and [Google](https://www.aced.io/questions?company=google)
- **Categories:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms), [Coding](https://www.aced.io/questions?type=coding)
- **Saved by members:** 23
- **Community answers:** No answers have been contributed yet.

Detailed company statistics for this question are available through [Upgrade](https://www.aced.io/upgrade?src=questions).

## Interview experiences

Four interview experiences are associated with this question:

1. **[Accenture · 6 months ago](https://www.aced.io/experiences/accenture-software-engineer-interview-21d9a5)** — Software Engineer, Mid Level / L4. The contributor described an interview focused on Node.js backend development, including API design, database management, caching, and real-world project implementations. They said explaining production experience and problem-solving went well, while more detailed answers on some concepts and system-design scenarios would have helped.
2. **[Amazon · 2 years ago](https://www.aced.io/experiences/amazon-software-engineer-interview-7a0aae)** — Software Engineer, Entry Level / L3. The contributor described all three rounds in the loop as smooth, with friendly interviewers, and said completing the loop in one sitting made preparation especially important.
3. **[Amazon · 2 years ago](https://www.aced.io/experiences/amazon-software-engineer-intern-interview-9beb3b)** — Software Engineer, Intern. The contributor described a well-structured, positive process with a professional and approachable interviewer and opportunities to demonstrate technical and problem-solving skills. They valued the collaborative discussion and suggested allowing slightly more time for alternative approaches and edge-case testing.
4. **[Anduril · 3 years ago](https://www.aced.io/experiences/anduril-forward-deployed-engineer-interview-0dd969)** — Forward Deployed Engineer, Mid Level / L4. The contributor emphasized preparation through notes, podcasts, questions, mock interviews, and repeated practice.

## Related question

- [Find the number of 1's in a sorted binary array.](https://www.aced.io/questions/1141/find-number-of-1s-sorted-binary-array)

## Related courses

### [Forward Deployed Engineering Interviews](https://www.aced.io/courses/forward-deployed-engineering)

![Forward Deployed Engineering Interviews](https://images.ctfassets.net/x78yjrjc11pq/25mhKSvDOiCwC89lDj89Ah/9a5fbfacc8d93f05c238ab55baa4e5e5/fde.png?w=800&h=800&fm=webp&q=75)

We help candidates prepare for forward deployed engineering (FDE) roles at companies such as Google, Anthropic, OpenAI, and startups. The course includes mock interviews, frameworks, and advice from senior candidates, with preparation for system-design, coding, and behavioral interviews.

### [Software Engineering Interview Prep](https://www.aced.io/courses/software-engineering)

![Software Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/4VkuYewBHUFIVUS5oJDW5h/02e833439b1289f25f38f13f81cbdca3/adobe_stock_optimized.jpeg?w=800&h=800&fm=webp&q=75)

We help candidates prepare for software-engineering roles at Google, Amazon, Microsoft, Meta, Apple, and other companies. Preparation covers mock interviews, frameworks, senior-candidate advice, data structures, algorithms, system design, people management, behavioral interviews, and more.

## Other Aced offerings

Our navigation identifies these additional interview-preparation courses and services:

- [Product Management](https://www.aced.io/courses/pm?src=nav) — Ace product interviews from strategy cases to technical skills.
- [Forward Deployed](https://www.aced.io/courses/forward-deployed-engineering?src=nav) — Beta preparation for FDE loops at Anthropic, OpenAI, Palantir, and more.
- [Engineering Management](https://www.aced.io/courses/engineering-management?src=nav) — Review leadership and people-management skills.
- [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.
- [Data Science](https://www.aced.io/courses/data-science?src=nav) — Execute statistical techniques and experimentation.
- [Machine Learning](https://www.aced.io/courses/ml-engineer?src=nav) — Review building, evaluating, and deploying AI/ML models.
- [Data Engineering](https://www.aced.io/courses/data-engineering?src=nav) — Design complex data models and ETL pipelines.
- [AI Engineering](https://www.aced.io/courses/ai-engineering?src=nav) — New.
- [Investment Banking](https://www.aced.io/ib?src=nav) — New.
- [Generative AI](https://www.aced.io/courses/gen-ai-interviews?src=nav)
- [Security Engineer](https://www.aced.io/courses/security-engineer?src=nav)
- [TPM](https://www.aced.io/courses/tpm?src=nav)
- [Solutions Architect](https://www.aced.io/courses/solution-architect-interview?src=nav)
- [UX / Product Design](https://www.aced.io/courses/product-designer-interview?src=nav)
- [BizOps & Strategy](https://www.aced.io/courses/bizops?src=nav)
- [View all courses](https://www.aced.io/courses?src=nav)

We also offer [Loops](https://www.aced.io/guides?src=nav), [Experiences](https://www.aced.io/experiences?src=nav), [Practice](https://www.aced.io/practice?src=nav), and [Coaching](https://www.aced.io/coaching?src=nav), including [mock interviews and coaching](https://www.aced.io/coaching?category=mock_interviews&src=nav), [resume review](https://www.aced.io/resume?src=nav), [salary negotiation](https://www.aced.io/coaching?category=negotiation&src=nav), and [how coaching works](https://www.aced.io/coaching/start?src=nav). Other resources include [Pricing](https://www.aced.io/upgrade?src=nav), [Job Referrals](https://www.aced.io/jobs/referrals?src=nav), [Blog](https://www.aced.io/blog?src=nav), [Resources](https://www.aced.io/resources?src=nav), [Perks](https://www.aced.io/perks?src=nav), [university programs](https://www.aced.io/pages/university?src=nav), [business programs](https://www.aced.io/pages/business?src=nav), [recruiter job posting](https://www.aced.io/jobs/post?src=nav), and our [Affiliate program](https://www.aced.io/affiliate?src=nav).

## Answering

Sign in or [sign up](https://www.aced.io/signup?src=nav&returnPath=/questions/971/sort-binary-array-linear-time) to submit an answer and mark this question complete. Existing members can [log in](https://www.aced.io/login?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%2F971%2Fsort-binary-array-linear-time&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%2F971%2Fsort-binary-array-linear-time). Opening a form does not execute a tool.