[데이터구조 트리] 데이터구조론 트리
- 최초 등록일
- 2003.10.10
- 최종 저작일
- 2003.10
- 17페이지/ 한컴오피스
- 가격 1,000원
소개글
완벽한 코드
목차
없음
본문내용
else { //부모가 없을때.
if((!root->left_child) && (!root->right_child) ) {
root=NULL;
}
else {
if((!temp->left_child) && (!temp->right_child)) {
//if(temp_max2->left_child) temp_max2->left_child=NULL;
if(parent_temp){
if(parent_temp->left_child && (!parent_temp->right_child)) parent_temp->left_child = NULL;
else if(parent_temp->right_child) parent_temp->right_child = NULL;
}
else if(temp_max2->left_child) temp_max2->left_child=NULL;
}
else if(temp->left_child) {
temp_max2=temp;
max_left= max_left_serch2(temp->left_child);
change_key = temp->id;//id 바꿈.
temp->id = max_left->id;
max_left->id = change_key;
strcpy(swap,temp->name);//이름 바꿈.
strcpy(max_left->name,swap);
strcpy(temp->name,max_left->name);
strcpy(swap,temp->work);//직업
strcpy(max_left->work,swap);
strcpy(temp->work,max_left->work);
strcpy
참고 자료
없음