<div class="warning"> 여기사 사용된 그림및 플래쉬 자료에 대한 저작권은 전북대학교 박순철 교수님께 있습니다.

각각의 플래쉬는 파란색의 PLAY버튼을 클릭하면 작동합니다. </div>

Tree#

Tree는 대상정보를 계층적으로 구조화할때 사용하는 자료구조이다.

다음은 Tree를 나타내는 그림이다.

1.jpg

트리 예제

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="400"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/사용예1.swf"> <param name="play" value="true"> <param name="loop" value="true"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/사용예1.swf" play="true" loop="true" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="400"></embed> </object>

트리 종류#

binary tree

binary tree는 차수가 2를 넘지않는 트리를 말한다.

2.jpg

skewed tree

말단 노드를 제외한 모든 노드들이 한방향의 자식노드만을 가지는 트리

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="250"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/LeftSkewTree.swf"> <param name="play" value="false"> <param name="loop" value="false"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/LeftSkewTree.swf" play="false" loop="false" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="250"></embed> </object>

Full binary tree

말단 노드를 제외한 모든 노드들이 왼쪽 자식 노드와 오른쪽 자식 노드를 모두 가지는 트리를 Full binary tree라 한다

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="250"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/FullBinaryTree.swf"> <param name="play" value="false"> <param name="loop" value="false"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/FullBinaryTree.swf" play="false" loop="false" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="250"></embed> </object>

연속 배열 저장법#

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="363"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/array_user.swf"> <param name="play" value="false"> <param name="loop" value="false"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/array_user.swf" play="false" loop="false" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="363"></embed> </object>

배열표현의 문제점#

데이터를 넣지 않더라도 기본적으로 공간이 할당이 되기 때문에 필요없는 공간에 대한 낭비가 심하게 된다.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="363"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/array_user_problem.swf"> <param name="play" value="false"> <param name="loop" value="false"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/array_user_problem.swf" play="false" loop="false" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="363"></embed> </object>

Linked List를 이용한 표현#

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" width="500" height="363"> <param name="movie" value="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/list_user.swf"> <param name="play" value="false"> <param name="loop" value="false"> <param name="quality" value="high"> <embed src="http://internet512.chonbuk.ac.kr/datastructure/tree/FLASH/list_user.swf" play="false" loop="false" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="500" height="363"></embed> </object>

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jpg
1.jpg 30.5 kB 1 16-Jul-2007 16:55 DongGukLee
jpg
2.jpg 16.2 kB 1 16-Jul-2007 21:08 DongGukLee
« This page (revision-5) was last changed on 18-Jul-2007 15:48 by DongGukLee  
G’day (anonymous guest) My Prefs

Referenced by
Basic

JSPWiki v2.8.4