# Partition an array into two sub-arrays with equal sum — Aced

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/969/partition-array-equal-sum
Source observed: 2026-11-05T00:28:05.333Z
Last checked: 2026-11-05T00:28:05.333+00:00
Indexed: 2026-11-07T02:25:19.856+00:00

---

# Partition an array into two sub-arrays with equal sum

**Difficulty:** Medium  
**Category:** [Data Structures & Algorithms](https://www.aced.io/questions?type=algorithms) · [Coding](https://www.aced.io/questions?type=coding)

We provide this coding-interview question for determining whether an array of integers can be partitioned into two subsets whose sums are equal. A valid partition divides every array element between two subsets with the same total.

## Examples

- **Input:** `[2, 4, 11, 5]`  
  **Output:** `True`  
  **Explanation:** The array can be partitioned into `[2, 4, 5]` and `[11]`, and both subsets sum to 11.
- **Input:** `[2, 7, 3, 1]`  
  **Output:** `False`  
  **Explanation:** The array cannot be partitioned into two subsets with equal sums.

## Question workspace

The question includes tabs for **Question**, **Solution**, and **Community**. The community section currently has no contributed answers. The workspace provides an editor, sharing view, output and test-results tabs, and a console. [Sign up to run code](https://www.aced.io/signup?src=lesson).

## Interview information

The question is associated with **26 interviews** and was reported as last asked **2 months ago**. The visible role and company associations are:

- [Software Engineer](https://www.aced.io/questions?role=swe) — 3
- [Data Engineer](https://www.aced.io/questions?role=data-engineer)
- [LinkedIn](https://www.aced.io/questions?company=linkedin) — 2
- [Google](https://www.aced.io/questions?company=google)
- [Walmart Labs](https://www.aced.io/questions?company=walmart-labs)
- [Apple](https://www.aced.io/questions?company=apple)
- [Meta](https://www.aced.io/questions?company=meta-facebook)

Two interview experiences are shared:

- [LinkedIn · 2 months ago](https://www.aced.io/experiences/linkedin-senior-software-engineer-interview-5dcc7c): “I went well in all rounds, coding went smoothly, i easily did all the questions. System design also went well, have a nice chat with the interviewer.” **Software Engineer · Senior / L5**
- [Google · 7 months ago](https://www.aced.io/experiences/google-software-engineer-interview-a24efe): “The process was pretty straight forward. The recruiter gave good guidance and gave a list of concepts to prep from. Pretty generic.” **Software Engineer · Mid Level / L4**

## Related questions

- [Split an array into equal sum subarrays](https://www.aced.io/questions/4326/split-an-array-into-equal-sum-subarrays)
- [Find a triplet in an array with a given sum.](https://www.aced.io/questions/1127/find-triplet-with-given-sum)
- [Print all sub-arrays of an array with distinct elements.](https://www.aced.io/questions/1133/sub-arrays-distinct-elements)

## Related courses

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

![Data Engineering Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/5XoOCgXlGqN2fa1zaroNWd/9a2e23df48a212bc00d352873feb2d6a/Data_Engineer_Interview_Prep_Hero_Image.jpg?w=800&h=800&fm=webp&q=75)

We prepare candidates for data engineering roles at Meta, Google, Amazon, Microsoft, Walmart, DoorDash, and other companies through mock interviews, frameworks, and advice from senior candidates. Topics include data modeling, pipeline design, SQL, coding, behavioral interviews, and more.

### [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 prepare candidates for software engineering roles at Google, Amazon, Microsoft, Meta, Apple, and other companies. Practice data structures, algorithms, system design, people management, behavioral interviews, and more using mock interviews, frameworks, and advice from senior candidates.

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

[Upgrade](https://www.aced.io/upgrade?src=questions) to unlock detailed company statistics for this question.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F969%2Fpartition-array-equal-sum&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%2F969%2Fpartition-array-equal-sum). Opening a form does not execute a tool.