in HW i am asked to implement a Binary Tree using pointers and then using the array implementation of bt. The problem is that while i know how to do both , they have to share the same main file . By that i mean , the exact same code i used for the pointers implementation is to be used by the array implementation. This means that when i am refercing to insertTree(tree,tree->left) must works for the array also .i am totally lost. My node is:
Typedef struct BTNode{
itemtype data;
Struct BTNode * left;
Struct BTNode * left;
}BTNode;