/****
【题目】试按依次对每个元素递归分解的分析方法重写求广义表的深度的递归算法。
广义表类型GList的定义:
typedef enum {ATOM,LIST} ElemTag;
typedef struct GLNode{
ElemTag tag;
union {
char atom;
struct {
GLNode *hp, *tp;
} ptr;
}un;
} *GList;
****/
int GListDepth(GList ls)
/* Return the depth of list */
{
int h1,h2;
if(ls==NULL)
return 1;
if(ls->tag==ATOM)
return 0;
h1=