---
title: "#binary-search-tree articles | Hashnode"
description: "Explore 20 articles tagged #binary-search-tree on Hashnode. Tutorials, guides, and how-tos from the community."
url: "https://hashnode.com/tag/binary-search-tree"
---

Tag

# #binary-search-tree

20 posts · 0 followers

[Tapan Rachchh](https://hashnode.com/@tapanrachchh) · [Feb 9](https://hashnode.com/posts/1382-balance-a-binary-search-tree/698950802dd5b57c8e0142e8)

### [1382\. Balance a Binary Search Tree](https://tapanrachchh.hashnode.dev/1382-balance-a-binary-search-tree?utm_source=hashnode&utm_medium=feed)

\# Definition for a binary tree node. # class TreeNode: # def \_\_init\_\_(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def balanceBST(self, root: TreeNode) -...

1 min read · [tapanrachchh.hashnode.dev](https://tapanrachchh.hashnode.dev/1382-balance-a-binary-search-tree?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Aug 3, 2025](https://hashnode.com/posts/largest-bst-in-binary-tree/688faabbf7c5a4fb43268604)

### [Largest BST in Binary Tree](https://chetan77.hashnode.dev/largest-bst-in-binary-tree?utm_source=hashnode&utm_medium=feed)

Problem You're given a binary tree. Your task is to find the size of the largest subtree within this binary tree that also satisfies the properties of a Binary Search Tree (BST). The size of a subtree is defined as the number of nodes it contains. (l...

3 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/largest-bst-in-binary-tree?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Jul 27, 2025](https://hashnode.com/posts/two-sum-iv-input-is-a-bst/6885c168e1dcf9bf52441c4f)

### [Two Sum IV - Input is a BST](https://chetan77.hashnode.dev/two-sum-iv-input-is-a-bst?utm_source=hashnode&utm_medium=feed)

Problem Given the root of a binary search tree and an integer k, return true if there exist two elements in the BST such that their sum is equal to k, or false otherwise. (link) Example 1: Input: root = \[5,3,6,2,4,null,7\], k = 9 Output: true Examp...

2 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/two-sum-iv-input-is-a-bst?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Jul 27, 2025](https://hashnode.com/posts/lowest-common-ancestor-of-a-binary-search-tree/6885bed9759c326d3ffd0003)

### [Lowest Common Ancestor of a Binary Search Tree](https://chetan77.hashnode.dev/lowest-common-ancestor-of-a-binary-search-tree?utm_source=hashnode&utm_medium=feed)

Problem According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).” Example 1: ...

2 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/lowest-common-ancestor-of-a-binary-search-tree?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Jul 26, 2025](https://hashnode.com/posts/delete-node-in-a-bst/68851ecef0d2cc5ffa0fda34)

### [Delete Node in a BST](https://chetan77.hashnode.dev/delete-node-in-a-bst?utm_source=hashnode&utm_medium=feed)

Problem Statement Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of the BST. Basically, the deletion c

3 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/delete-node-in-a-bst?utm_source=hashnode&utm_medium=feed)

[Chetan Datta](https://hashnode.com/@chetan77) · [Jul 25, 2025](https://hashnode.com/posts/binary-search-trees/6883cd39f58ff891f13b30d4)

### [Binary Search Trees](https://chetan77.hashnode.dev/binary-search-trees?utm_source=hashnode&utm_medium=feed)

Problem Statement You are given the root of a binary search tree (BST) and an integer val. Find the node in the BST that the node's value equals val and return the subtree rooted with that node. If such a node does not exist, return null. (Link) Exam...

2 min read · [chetan77.hashnode.dev](https://chetan77.hashnode.dev/binary-search-trees?utm_source=hashnode&utm_medium=feed)

[Shiva Krishna](https://hashnode.com/@shiva-krishna) · [Feb 21, 2025](https://hashnode.com/posts/bst/67b880666ff849cef8be44c5)

### [Binary Search Trees | DSA Patterns](https://dsa-patterns.hashnode.dev/bst?utm_source=hashnode&utm_medium=feed)

1\. Basics Search an element Ceil of an element Floor of an element Insert an element Delete an element 2. Medium Find K-th smallest/largest element in BST Check if a tree is a BST or BT LCA in Binary Search Tree Construct a BST from a pre...

1 min read · [dsa-patterns.hashnode.dev](https://dsa-patterns.hashnode.dev/bst?utm_source=hashnode&utm_medium=feed)

[Shiva Krishna](https://hashnode.com/@shiva-krishna) · [Feb 3, 2025](https://hashnode.com/posts/binary-trees/67a1015bbfad605c8e388bb1)

### [Binary Tree Patterns | DSA](https://dsa-patterns.hashnode.dev/binary-trees?utm_source=hashnode&utm_medium=feed)

Discover key tree data structure patterns and practice questions designed to help you crack coding interviews with confidence. Learn traversal techniques, u

2 min read · [dsa-patterns.hashnode.dev](https://dsa-patterns.hashnode.dev/binary-trees?utm_source=hashnode&utm_medium=feed)

[Kanchan Rai](https://hashnode.com/@kanchanraiii) · [Dec 8, 2024](https://hashnode.com/posts/day-20-100-days-of-dsa/67584f3db862c8919f6a8d47)

### [Day 20: 100 Days of DSA](https://kanchanraiii.hashnode.dev/day-20-100-days-of-dsa?utm_source=hashnode&utm_medium=feed)

Binary Search Tree

6 min read · [kanchanraiii.hashnode.dev](https://kanchanraiii.hashnode.dev/day-20-100-days-of-dsa?utm_source=hashnode&utm_medium=feed)

[Aman Pratap Singh](https://hashnode.com/@amanps12) · [Dec 1, 2024](https://hashnode.com/posts/know-about-binary-search-tree/674c0474d7c6dbb9cdac8362)

### [Know About Binary Search Tree](https://amanps12.hashnode.dev/know-about-binary-search-tree?utm_source=hashnode&utm_medium=feed)

Binary Search Trees (BSTs) are a specialized form of binary trees designed to optimize the searching process.

19 min read · [amanps12.hashnode.dev](https://amanps12.hashnode.dev/know-about-binary-search-tree?utm_source=hashnode&utm_medium=feed)
