Top "Binary-tree" questions

A tree data structure in which each node has at most two child nodes.

Shortest Root to Leaf Path

What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path in a BST (Binary Search Tree). …

algorithm recursion binary-tree breadth-first-search
Is SortedDictionary a red-black tree?

I saw several quotes about this on the Internet but no official documentation? Can anyone tell me where I can …

c# .net binary-tree sorteddictionary
Find paths in a binary search tree summing to a target value

Given a binary search tree and a target value, find all the paths (if there exists more than one) which …

algorithm data-structures binary-tree
compare Hash with Binary search tree

We all know that a hash table has O(1) time for both inserts and look-ups if the hash function was …

hash binary-tree
Python - Tree traversal question

I have a hard time with tree traversal, and so avoid it like the plague... normally. I have a class …

python algorithm binary-tree tree-traversal
max heap and insertion

I have the an integer array of size 10. I need to draw the complete binary tree which I did. Now …

algorithm data-structures heap binary-tree max-heap
Java generics issue: Class "not within bounds of type-variable" error.

I'm working on a project for class that involves generics. public interface Keyable <T> {public String getKey();} public …

java generics binary-tree binary-search-tree
Nicely printing/showing a binary tree in Haskell

I have a tree data type: data Tree a b = Branch b (Tree a b) (Tree a b) | Leaf a ...…

haskell tree binary-tree show
Finding Path Between Two Nodes in a Binary Tree

I have the following simple tree: My goal is to find the path between the two manager nodes. The two …

java data-structures binary-tree nodes args