??.?. (?????????????????????????????? : Data communication - PowerPoint PPT Presentation

1 / 43
About This Presentation
Title:

??.?. (?????????????????????????????? : Data communication

Description:

COSC2202 (Data Structure) – PowerPoint PPT presentation

Number of Views:128
Avg rating:3.0/5.0
Slides: 44
Provided by: word1076
Category:

less

Transcript and Presenter's Notes

Title: ??.?. (?????????????????????????????? : Data communication


1
????????? ???? COSC2202 ??????????????? (Data
Structure)
  • ?????????????
  • ?. ??????? ????????
  • ??.?. (?????????????????????????????? Data
    communication Network)
  • ?????????????????????????? ???????????
  • ??.?. (???????????????????)
  • ??????????????????????

2
???????????? http//dearnan.wordpress.com
  • ????????????????????????????????????????
    ?????????????????????? (String Processing) ??????
    ????????????????????? (Arrays, Record and
    Pointers) ?????????????? (Linked List) ????
    (Stacks) ??? (Queue) ???????????? (Recursion)
    ?????? (Tree) ????????????????????? (Graphs and
    their Applications) ??????????????????????????????
    (Sorting and Searching)

3
??????????????????
  • ????????????????????????????? 80
  • ????????????? 3 ?????
  • ?????????????????????????????? 2 ????? ?????????
    1 ?????
  • ??????????????????????????????????????????????????
    ???????
  • ?????????? ???????????????????????????????????
    ??????????????????????????????????????????

4
??????????????????
  • ????????????????????????????????????
    ?????????????????????????????????? 12 ??????
    ?????????????????????????????? ??????????
  • ????,????????????????
  • ???????????????????????
  • ??????????????????????????????????????????????
    ????????????????????????????????????

5
??????????????????????
  • ?????????? (70) ????????
  • ???????? (???????????? ???????? ???
    ??????????) 15
  • ??????????????????? 25
  • ?????????? 30
  • ??????? (30)
  • ?????????? 30

6
????????????????? (????????)
  • 80-100 A
  • 75-79 B
  • 70-74 B
  • 65-69 C
  • 60-64 C
  • 55-59 D
  • 50-54 D
  • 0-49 E

7
???????????????
  • ????-???????????????
  • ??????????????????????????
  • ?????????????????????? ??????
  • ????????????????????????????
  • ????????????????????????
  • ??????????
  • ???????????????????????????????????
  • ???????????????
  • ??????????????
  • ??????????

8
???????????????????????
  • ??????????????? ????????????????????????????????
  • ??? ??.????? ????????? ??? ????? ????????

9
Introduction
  • ????????????????????????????????????????
    ?????????????????
  • ??????????? ???????????????
  • ????????????????????????
  • ??????????????? (CONTROL STRUCTURE)

10
1. ??????????????????????????
  • ?????? (Data) ??? ??????????????? ?
    ?????????????????????????????????????????
  • ????????? (Structure) ??? ?????????????????????
    ???????
  • ??????????????? (Data Structure)???
    ??????????????????????????????????????????????? ?
    ????????????????????????????????????????????
    ???? ????? ????? ?? ????????????????????????????
    ????????? ??????????????? ????? ????? ????
    ??? ??? ??????? ???????

11
2. ????????????????????????
  • ??????????????????????????????????????????????????
    ????? ??????????? 2 ?????? ???
  • ???????????????????????? (Physical Data
    Structure)
  • ??????????????????????? (Logical Data Structure)

12
(No Transcript)
13
2.1 ????????????????????????
  • ?????????????????????????????????????????????????
    ????????????? 2 ????????????????????? ???
  • 1. ??????????????? (Primitive Data Types)
    ?????? ?????????? (Integer) ?????????? (Real)
    ???????????? (Character)
  • 2. ??????????????? (Structured Data Types)
    ?????? ????????? (Array) ????????????? (Record)
    ??? ?????????? (File) ???????

14
2.2 ???????????????????????
  • ?????????????????????????????????????????????????
    ???????????????????????????????????????????
    ???????? 2 ?????? ???
  • 1. ?????????????????????????? (Linear Data
    Structures)???????????????????????????????????????
    ? ???? ????? (List) ???? (Stack) ??? (Queue)
    ????? (String) ???????
  • 2. ????????????????????????????? (Non-Linear
    Data Structures) ?????????????????????????????????
    ???????????????????????? ?????? ??? (Tree)
    ??????? (Graph)

15
3. ??????????????? (CONTROL STRUCTURE)
  • ?????????????????????????????????????????????????
    ?????????????????????????????????? ??????????????
    3 ??? ??? ????????????? (Sequential), ???????????
    (Condition Select) ??????????? (Loop)
  • 1. ????????????? (Sequential) ???????????????????
    ?? ???????? ???????????????????????
    ????????????????????????????

?????? A
?????? B
16
3. ??????????????? (CONTROL STRUCTURE)
  • 2. ??????????? (Condition Select)
  • ???????????????????????????? ????????????????????
    ?? ??????????? 2 ??? ?????? ?????? IFELSE

17
3. ??????????????? (CONTROL STRUCTURE)
  • ????????????????????????? ??????? 2 ??? ??????
    ?????? switch-case

18
3. ??????????????? (CONTROL STRUCTURE)
  • 3. ???????? (Loop)
  • ??????????????? ?????????????????????? ??????
    ?????? for, while ??? do while

19
??????????????? Array
  • ???????????????????????????????????? Linear List
    ????????????????????????????? ???
    ????????????????????????????????????????
    ????????????????????????????? ???????????????????
    ????????????????????????????? ???????????????????
    ?????????????

20
??????????????? Array
  • ??????
  • Array l..u                                  
    ???????? 1 ????
  • Array l1..u1,l2..u2                    
    ???????? 2 ????
  • Array l1..u1,l2..u2,l3..u3           ????????
    3 ????

21
??????????????? Array
  • ????????? Array
  • ????????????????????????????????????? ?????
    subscript ????????????????????????????????
    ???????????? 1 ????????? subscript ??????
    ??????????????????????? ??????????? subscript
    ??????? 1 ????????? ?????????? ??????????????
  • float A10
  • int K5 10

22
??????????????? Array
  • ?????????????????????????????????????????????
    subscript ???
  • 1. ????????????????????????????????????????????
    ??????
  • 2. ????????? ???????? ?????????? (lower
    bound)
  • 3. ????????? ???????? ???????? (upper bound)
  • ??????? subscript upper bound lower bound 1

23
??????????????? Array
  • ????????????????????????????? n ???? ????????
  • ????????????? ??????????????? subscript
    ????????
  • ????????????? K ??????????????? subscript
    ????????
  • (5-11) (10-11)
  • 5 10 50

24
?????? 1 ????
  • ??? ??????????????????????????????????????????????
    ???????????????????????????????????
    ????????????????????????????????
    ?????????????????????? 1 ???

25
?????? 1 ????
  • ????????????????????????? i Loc (Ai) L0
    (i-L)C
  • Loc(A1)   L
  • Loc(A2)   LC
  • Loc(A3)   L2C         ...
  • Loc(Ai)   L(i-1)C
  • ????????????? Array Al..u ????????u-l1 ???

26
????????
  • ????? Array Auto 1932..1984 ????????????????????
    ????????????????????? 4 ???? ????????????????
    Array Auto ??? Auto1932 200  ??????????????
    Auto1980 ???????????? Array Auto

Loc (Auto1980) 200
4(1980-1932)
200
4(48)

392 ??????? Array Auto 4 ((1984 -
1932)1) 212
27
?????? 1 ????
  • ??????
  • data-type array-nameexpression
  • data-type ??? ????????????????????? ????
    int char float
  • array-name ??? ?????????????
  • Expression ??? ???????????????????????????????
    ??????????????
  • ???????? char a4 int num10

28
????????
  • char a4
  • ??????? ????????????????????????????????????????
    ??????????? a ???????????????????? character
    ?????????? 4 ?????? ???????? ????????????????????
    ?????? 1byte ??????? 1 ??????????

29
?????????????????????????????????????????????
  • ??????
  • data-type array-namen value1,
    value2,..,value n
  • ????????
  • int num5 1,2,3,4,5
  • ???? int num 1,2,3,4,5
  • float x6 0,0.25,0,0.5,0,0

30
??????????????????????????????? Character
  • ??????
  • char array-namen string
  • ????????
  • char ch9 SAWASDEE ????
  • char ch9S,A,W,A,S,D,E,E,\
    0
  • ?????????????????????????? ch0 ????????? S ???
    ch7 ????????? E ??? ch8 ?????????
    \0???????????? ?????????????????????????????

31
?????? 2 ????
  • ??????
  • type array-namen m
  • type ??????? ???????????????????????????
    ????????????
  • array-name ??????? ????????????????????????????
    ???????????
  • n ??????? ???????????????????????????
  • m ??????? ???????????????????????????????

32
????????
  • ?????????????????????????????????????? ?????? 6
    ???????????????? a

33
????????????????? ????????? 2 ????
  • ???????????????????? int a23
  • int a23 1,2,3,4,5,6
  • ???? int a23 1,2,3,4,5,6
  • ???? int a3 1,2,3,4,5,6

34
???????? ?????????
includeltstdio.hgt includeltconio.hgt void main() int i, n10 32,27,64,18,95,14,90,70,60,37 printf("Element\tValue\n") for(i 0 i lt 9 i) printf("d\td\n", i, ni) getch()
35
???????? ?????????
includeltstdio.hgt includeltconio.hgt void main() int x53,12,22,8,16 int i,max max 0 for (i0ilt5i) if (max lt xi) max xi printf("Max d",max) getch()
36
Pointers ??? Arrays ??? Pointers
  • Pointer ??????????????????????????????????????????
    ??????? (Address) ?????????????????????????????
  • ?????? type   variable-name
  • type ???????   ?????????????
  •       ???????   ?????????????????????????
    ??????????????????????????????????
  • ????????????????
  • variable-name    ?????????????????????????????????
    ?????????????????????

37
Pointers ??? Arrays ??? Pointers
  • char  prt                               
  • ???????????   ??????????????? prt
    ??????????????????????????????????????????????????
    ???? character            
  • int  a                      
  • ???????????  ??????????????? a
    ??????????????????????????????????????????????????
    ??????? integer

38
Pointers ??? Arrays ??? Pointers
  • ???????????  ????????????????????????????????????
    ??????????????????????????????????????????????????
    ?????????? ????
  • x10 (?????????????? x ?????????????????? 1000
    ????? 10 ????????)
  •   int  y , x10   y x
  • ?????? y ???????????????????????????????????????
    1000 ??????????????????????

39
???????? Pointers ??? Arrays ??? Pointers
  • ????????? 1 int a, ptr, b, c , d
  • int a, ptr, b, c , d
  • a25
  • ptr a
  • b a ????????? 2 a 25
  • c ptr
  • d ptr

40
???????? Pointers ??? Arrays ??? Pointers
  • ????????? 3     ptr a
  • int a, ptr, b, c , d
  • a25
  • ptr a
  • b a ????????? 4      b a
  • c ptr
  • d ptr

41
???????? Pointers ??? Arrays ??? Pointers
  • ????????? 5 c ptr
  • int a, ptr, b, c , d
  • a25
  • ptr a
  • b a ????????? 6 d ptr
  • c ptr
  • d ptr

42
?????????
  • ?????????????????????????????????????? 20 ??????
    ?????????? Array ???????????????????? ? ??????
  • ??? Max ??? Min ??????????????????????????? Array
    ?????????????
  • ????? (Sum) ???????????? (Average)

43
THE END
  • ??????????????????????? ????????????????????
    ?????? http//dearnan.wordpress.com
  • ???? PowerPoint ??????????????????????????????????
    ???
Write a Comment
User Comments (0)
About PowerShow.com