CChetan Datta·Jul 27, 2025Validate Binary Search TreeProblem Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains...2 min read·chetan77.hashnode.dev
CChetan Datta·Jul 27, 2025Binary Search Tree IteratorProblem Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST): (link) BSTIterator(TreeNode root) Initializes an object of the BSTIterator class. The root of the BST is given as part of ...3 min read·chetan77.hashnode.dev
CChetan Datta·Jul 26, 2025Delete Node in a BSTProblem 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 c3 min read·chetan77.hashnode.dev
AAnni Huang·Jul 11, 2025LeetCode 653 Two Sum IV - Input is a BST - In Order Traversal (Easy, Java, O(n))LeetCode 653. Two Sum IV - Input is a BST Approach The problem requires us to find if there exist any two nodes in a Binary Search Tree (BST) that sum up to a given target value k. The solution uses an inorder traversal approach combined with a has...3 min read·huanganni.hashnode.dev
NNitin Singh·May 17, 2025Binary Search Tree (BST)Efficient Searching and Ordering5 min read·ns717.hashnode.dev
SShiva Krishna·Feb 21, 2025Binary Search Trees | DSA Patterns1. 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
AArka Infotech·Jan 10, 2025Binary Search Trees Explained: Algorithm and Use CasesLearn how Binary Search Trees work with algorithm insights, use cases, and Python code examples for efficient data management7 min read·blogs.arkainfotech.in
JJyotiprakash Mishra·Sep 25, 2024Introduction to TreesIn computer science, trees are a fundamental non-linear data structure composed of nodes connected by edges. A tree is a hierarchical model that represents a collection of elements, each of which can have a number of children but only one parent (exc...45 min read·blog.jyotiprakash.org
FFatima Jannet·Aug 17, 2024Basics of Binary Search Trees (BST)Learn Binary Search Trees: creation, insertion, deletion, searching operations, and time/space complexities5 min read·mahia.hashnode.dev
TTanmay Sarkar·Jun 24, 2023Binary Trees Explained: A Step-by-Step TutorialDiscover the power of Binary Trees with this easy-to-follow tutorial, From understanding nodes and edges to navigating Binary Trees.7 min read·tanmaysarkar.hashnode.dev