Page 1 of 1

Consider the following structures and resulting tree that permits duplicate keys. Duplicates are stored as a linked-list

Posted: Fri May 20, 2022 3:45 pm
by answerhappygod
Consider the following structures and resulting tree
that permits duplicate keys. Duplicates are stored as a linked-list
that is linked to the tree node. Implement a function that finds
all occurrences of a given data key and returns the count. Assume
the tree can be accessed with a global pointer named root. For
example, for the following tree, find(‘A’) would return
3.
Consider The Following Structures And Resulting Tree That Permits Duplicate Keys Duplicates Are Stored As A Linked List 1
Consider The Following Structures And Resulting Tree That Permits Duplicate Keys Duplicates Are Stored As A Linked List 1 (14.18 KiB) Viewed 46 times
struct datanode {
int data;
datanode * next;
};
struct treenode {
datanode * next;
treenode * left;
treenode * right;
};
// returns the count of key
int find(int key);
ААА B СС)