# Floor and ceil in a binary search tree

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/1163/floor-ceil-in-bst
Source observed: 2026-11-05T00:43:25.309Z
Last checked: 2026-11-05T00:43:25.309+00:00
Indexed: 2026-11-06T16:21:36.549+00:00

---

# Find the floor and ceil values in a binary search tree (BST).

We host this as a coding interview-practice question about finding the floor and ceil values for a target in a binary search tree.

## Community answers

No answers have been contributed by the community yet.

## Related questions

- [Find the k-th smallest and k-th largest element in a binary search tree (BST).](https://www.aced.io/questions/1162/k-th-smallest-largest-in-bst)
- [Delete Node in a Binary Search Tree (BST).](https://www.aced.io/questions/5156/delete-node-binary-search-tree)
- [Find the first common ancestor of two nodes in a binary tree.](https://www.aced.io/questions/4538/binary-tree-first-common-ancestor)

## Your answer

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

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

---

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