Category Archives: Binary Search Tree

Print Common Nodes in Two Binary Search Trees

Given two Binary Search Trees, find common nodes in them. In other words, find intersection of two BSTs. Example: We strongly recommend you to minimize your browser and try this yourself first. Method 1 (Simple Solution) A simple way is to one by once search every node of first tree in second tree. Time complexity… Read More »