2진탐색트리 asort()를 이용한 sorting프로그램 작성

질문 제목 : 질문 내용 :구축된 이진탐색트리의 각 노드를 위하여 다음의 노드 포인터 tree_pointer 를 이용하여 key 값의 오름차순으로 출력하는 함수를 작성하고 구현하시오.
void asort(tree_pointer root);

struct bsinode {
tree_pointer left_child;
int key;
tree_pointer right_child;
};
void asort( tree_pointer root )
{
if ( root )
{
asort( root-left_child );
printf( “%d ”, root-key );
asort( root-right_child );
}
}

C언어 다른 글

목록