Presentation is loading. Please wait.

Presentation is loading. Please wait.

107-1 Data Structure Homework 2

Similar presentations


Presentation on theme: "107-1 Data Structure Homework 2"— Presentation transcript:

1 107-1 Data Structure Homework 2
2018/11/16

2 Tree Traversal Input : Output : (60%) Inorder traversal
Operands : any characters except +, -, *, / Operators : +, -, *, / Output : (60%) Preorder traversal Post order traversal Level order traversal Translate the operands to ASCII code and show result of the expression. Remember to consider parentheses.

3 Tree Traversal Example

4 Tree Traversal

5 Heap Generate key value (1-20) randomly for each leaf and show the result. (10%) A=15 ; B=12 ; C=8 ; D=3 ; E=4 Insert the key value of A to E to the following max heap and show the result. (30%) Original : 14[12[10, 8]7[6]] Insert A : 15[12[10, 8]14[6, 7]] Insert B : _________________ Insert C : _________________ ……

6 Tree Send code and result (print screen) Deadline 2018/12/17 12:00
Deadline 2018/12/17 12:00 資料結構hw2_名字 with rar or zip format Use C or C++ programming.

7 The end Thanks for your time


Download ppt "107-1 Data Structure Homework 2"

Similar presentations


Ads by Google