Sorting Arrays and Collections

Embed Size (px)

Citation preview

  • 8/12/2019 Sorting Arrays and Collections

    1/6

    .

    ,

    . . .

    .

    .

    , .

    .

    . , ,

    , , ..

    #

    = ();

    .A(7);.A(2);.A(5);.A(3);

    .("B :");

    ( )

    .();

    .();

    .("A :");

    ( )

    .();

    A()

    .A(7).A(2).A(5).A(3)

  • 8/12/2019 Sorting Arrays and Collections

    2/6

    .("B :")

    A.()

    .()

    .("A :")

    A.()

    /

    #

    = 7, 2, 5, 3 ;

    .("B :");

    ( )

    .();

    A.();

    .("A :");

    ( ).();

    A() = 7, 2, 5, 3

    .("B :")

    A.()

    A.()

    .("A :")

    A.()

  • 8/12/2019 Sorting Arrays and Collections

    3/6

    ,

    . ,

    . ,

    .

    #

    : ,

    ;;

    .;

    . = ;

    .;

    . = ;

    (, )

    . = ;. = ;

    ()

    .(());

    ()

    // . = ..(.);

    // ...

  • 8/12/2019 Sorting Arrays and Collections

    4/6

    ( == 0)

    // ... . = ..(.);

    ;

    , ()

    A A

    () A

    .(B A)

    . =

    () A

    .(B A)

    . =

    (B A, B A)

    . = . =

    (B A) A.

    .((, ))

    (B A) A().

    ' . A= ..(.)

    ' ... = 0

    '... . = ..(.)

  • 8/12/2019 Sorting Arrays and Collections

    5/6

    , . .

    ,

    .

    ,

    , , .

    . , .

    #

    = ();

    .A(("", ""));.A(("", ""));.A(("", ""));.A(("A", "B"));

    .("B :");

    ( )

    .("0, 1",.,.);

    .();

    .("A :");

    ( )

    .("0, 1",.,.);

    A()

  • 8/12/2019 Sorting Arrays and Collections

    6/6

    .A(("", "")).A(("", "")).A(("", "")).A(("A", "B"))

    .("B :")

    A .("0, 1",

    ., .)

    .()

    .("A :")

    A .("0, 1",

    .,

    .)