# Print the cousins of a given node in a binary tree. | 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/1155/print-cousins-binary-tree
Source observed: 2026-11-05T00:39:34.794Z
Last checked: 2026-11-05T00:39:34.794+00:00
Indexed: 2026-11-07T03:00:43.336+00:00

---

# Print the cousins of a given node in a binary tree.

We provide this coding question in our public question library. The problem concerns finding the cousins of a specified node in a binary tree. The page contains the question title and tools for answering it; the supplied content does not include a problem statement, input/output specification, constraints, examples, or solution.

## Community answers

No answers have been contributed by the community yet.

## Your answer

You must log in or sign up to answer this question. Submitting an answer marks the question complete.

## Related questions

- [Print the top view of nodes in a binary tree.](https://www.aced.io/questions/5570/top-view-nodes-binary-tree)
- [Print the left view of a binary tree.](https://www.aced.io/questions/1473/print-left-view-binary-tree)
- [Given a binary tree, check if each node is the average of all descendants](https://www.aced.io/questions/5571/binary-tree-check-node-average-of-descendants)

## About Aced

We are Aced, formerly Exponent. We offer interview preparation courses and practice resources, including software engineering, system design, data science, machine learning, data engineering, product management, behavioral, SQL, and other interview topics.

Relevant entry points:

- [All questions](https://www.aced.io/questions)
- [Software Engineering course](https://www.aced.io/courses/software-engineering?src=nav)
- [System Design course](https://www.aced.io/courses/system-design-interviews?src=nav)
- [Coding Questions](https://www.aced.io/questions?type=algorithms&filterBy=codeEditor&src=nav)
- [Log in](https://www.aced.io/login?src=nav)
- [Sign up](https://www.aced.io/signup?src=nav&returnPath=/questions/1155/print-cousins-binary-tree)

---

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