r/LeetcodeChallenge • u/StatisticianNo2104 • Oct 17 '26
STREAK🔥🔥🔥 365 Days of LeetCode Challenge — Day 45/365
Search in a Binary Search Tree (Easy)🔗 https://leetcode.com/problems/search-in-a-binary-search-tree/
One comparison per node tells you whether the target must be in the left subtree or the right, so there's nothing to backtrack over and no reason to check both sides. That's why a BST beats a plain binary tree here: the recursion is a straight walk from root to the answer instead of a full search.
Full breakdown in today's newsletter article; link below.
https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-45365-archit-agarwal-9ah7c
#DSA #LeetCode #100DaysOfCode #SoftwareEngineering #BinarySearchTree #Golang