Here is the code directory structure,
$ ls
lcrsImpl.c multiWalkImpl.c tree.h
For the below two rooted tree representations,
#include"../../list/list.h"
#if defined(LCRS)
typedef struct SiblingTreeNode{
struct SiblingTreeNode *parent;
void *item;
struct SiblingTreeNode *firstChild;
struct SiblingTreeNode *nextSibling;
}Node;
typedef struct LCRSTree{
Node *root;
int size;
}Tree;
#elif defined(MULTI_WALK)
typedef struct treeNode{
struct treeNode *parent;
void *item
List **childList;
}Node;
typedef struct multiWalkTree{
Node *root;
int size
}Tree;
#else
#error "Wrong representation "
#endif
Tree
abstraction can be re-used by other abstractions.
Question:
To write a Tree
abstraction using two representations(mentioned above),
As per the real world experience, What are the important(common) operations that need to be implemented on rooted tree?
Can you provide the signature(function declaration) of those operations?
Note - This would help me continue my implementation