There is a tree which denotes 4 directions,

Node direction{
direction *side1,*side2,*side3,*side4;
};

makeTree(){
direction *tree;
getdirection(tree,1);
getdirection(tree->right,2);
getdirection(tree->left,1);

/*
how to form such a tree
           root
   side1         side2
 side3  side4   side1  side2
*/
}

getDirection(Node *node,int val){
if(val == 1){
//should form direction to side1,side2
}else if(val == 2){
//should form direction to side3,side4
}
}


-- 
Thanks and regards,
Raghavan.K.L
<http://in.linkedin.com/in/raghavankl>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to