메뉴 바로가기 검색 및 카테고리 바로가기

한빛미디어

뇌를 자극하는 알고리즘

뇌를 자극하는 알고리즘 질의응답 게시판입니다.

LCRS DestroyTree 함수

2010-10-07

|

by aplusst

2181

void LCRS_DestroyTree(LCRSNode *Root)
{
   if(Root->RightSibling != NULL)
   {
      LCRS_DestroyTree(Root->RightSibling);
      Root->rightSibling = NULL;
   }
  
    if(Root->LeftChild != NULL)
   {
      LCRS_DestroyTree(Root->LeftChild);
      Root->LeftChild = NULL;
   }
  
   LCRS_DestroyNode(Root);
}

이렇게 해도 무방한가요?
댓글 입력