Cấu trúc dữliệu và giải   thuật
Tìm kiếm   Merge                   Quick Sortnhị phân    Sort
• Tìm kiếm trên   Tìm     mảng tăng dần.kiếm nhị  phân   • 30 lần tìm kiếm           cho 1 tỉ dữ liệu.      Merge      • T...
Minh Họa Thuật Toán Tìm Nhị Phân
Minh Họa Thuật Toán Tìm Nhị PhânTìm thấy 2 tại vị trí 1                              X=2      L                       M   ...
Minh Họa Thuật Toán Tìm Nhị Phân (tt)                             X=-1      L                      M                      ...
Minh Họa Thuật Toán Tìm Nhị Phân (tt)Cho mảng sau: 2 2 2 3 7 8 9 10 15.1. Tìm phần tử k=15.2. Tìm phần tử k=2 và cho biết ...
Merge Sort – thuật toán
Merge Sort – Ví Dụ k=1Phân phối luân phiên  0     1    2    3     4   5    6   7  12    2    8    5     1   6    4   15
Merge Sort – Ví Dụk = 1             Phân phối luân phiên 0       1    2    3    4    5    6    712       2    8    5    ...
Merge Sort – Ví DụTrộn từng cặp đường chạy0    1    2    3    4    5    6   712   8    1    42    5    6    15
Merge Sort – Ví Dụk = 1            Trộn từng cặp đường chạy0        1    2      3    4    5    6    712   8        1    ...
Merge Sort – Ví Dụk = 2            Phân phối luân phiên2    12       5    8    1    6    4   150        1    2    3    4...
Merge Sort – Ví Dụk = 2            Trộn từng cặp đường chạy0        1    2      3    4    5    6    72    12       1    ...
Merge Sort – Ví Dụk = 2             Trộn từng cặp đường chạy 0       1    2        3    4   5    6    7 2   12        1 ...
Merge Sort – Ví Dụk = 4            Phân phối luân phiên2    5        8    12   1    4    6   150        1    2    3    4...
Merge Sort – Ví Dụk = 4         Trộn từng cặp đường chạy 0       1    2    3    4    5    6   7 2   5        8    12 1  ...
Merge Sort – Ví Dụk = 4         Trộn từng cặp đường chạy 0       1    2    3    4    5    6   7 2   5        8    12 1  ...
Merge Sort – Ví Dụk = 80        1    2    3    4    5    6    71    2        4    5    6    8    12   15
Merge Sort – Ví Dụ1   2    3    4    5    6    7    81   2    4    5    6    8    12   15
Merge Sort – Ví DụCho ví dụ
Quick Sort1. X là phần tử nằm giữa mảng.2. Tìm các phần tử bên trái X mà lớn hơn X, đưa các phần tử nàyvề phía bên phải X....
Quick Sort
Quick Sort – Ví Dụ • Cho dãy số a:      12      2        8       5       1   6     4      15Phân hoạch đoạn l =0, r = 7:  ...
Quick Sort – Ví Dụ 4          2     8    5   1     6     12     15     i=0                                       j=6l=0   ...
Quick Sort – Ví Dụ• Phân hoạch đoạn l = 0, r = 2:4     2      1     5     8        6   12   15l=0        r =3i=0         j=2
Quick Sort – Ví Dụ• Phân hoạch đoạn l =4, r = 7:1     2     4     5      8        6     12    15                         l...
Quick Sort – Ví Dụ• Phân hoạch đoạn l =6, r = 7:1     2     4     5      6       8   12   15
Quick Sortvoid QuickSort(int a[], int left, int right){ int i, j, x;   x = a[(left+right)/2];   i = left; j = right;   do ...
Quick Sort – Ví Dụ Phân hoạch đọan [0,7]  i                                  j  0    1    2    3    4    5    6    7 12  ...
Quick Sort – Ví Dụ Phân hoạch đọan [0,7]                 X   5        i                    j  0     1    2       3   4   ...
Quick Sort – Ví Dụ Phân hoạch đọan [0,2]             j         i  0     1    2    3    4    5    6     7  4     2    1   ...
 Phân hoạch đọan [0,2]  i          j  0     1    2     3   4   5   6    7  4     2    1     5   8   6   12   15        X ...
Quick Sort – Ví Dụ Phân hoạch đọan [4,7]                     i               j 0    1    2    3    4     5   6     7 1   ...
Quick Sort – Ví Dụ Phân hoạch đọan [5,7]                      j     i  0    1    2    3    4     5   6     7  1    2    4...
Quick Sort – Ví Dụ Phân hoạch đọan [5,7]                           i           j 0     1    2   3    4     5     6     7 ...
Quick Sort – Ví Dụ        Quick Sort – Ví Dụ0   1      2   3    4   5     6    71   2      4   5    6   8     12   15
Quick Sort – Ví DụCho ví dụ
WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1
WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1
WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1
WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1
WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1
Upcoming SlideShare
Loading in...5
×

WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1

272

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
272
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • SmartArt custom animation effects: pictures peek-in(Basic)To reproduce the SmartArt effects on this page, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt.In the Choose a SmartArt Graphic dialog box, in the left pane, click Matrix. In the Matrix pane, double-click Titled Matrix (second option from the left) to insert the graphic into the slide. Select the graphic. Under SmartArt Tools, on the Format tab, click Size, and then do the following:In the Height box, enter 5.67”.In the Width box, enter 8.5”.Under SmartArt Tools, on the Format tab, click Arrange, click Align, and then do the following:Click Align to Slide.Click Align Middle. Click Align Center. Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text in the top-level bullet only (text for the rounded rectangle at the center of the graphic). To remove the [Text] placeholder in the second-level bullets, select each bullet and press SPACE.On the slide, select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under Best Match for Document click Moderate Effect.Select the rounded rectangle at the center of the graphic. On the Home tab, in the Font group, select 28 from the Font Size list, click the arrow next to Font Color, and then click White, Background 1 (first row, first option from the left).With the rounded rectangle selected, under SmartArtTools, on the Format tab, in the bottom right corner of the ShapeStyles group, click the FormatShape dialog box launcher. In the FormatShape dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Linear.In the Direction list, select LinearUp (second row, second option from the left).Under Gradient stops, click Add or Remove until three stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme ColorsclickWhite, Background 1, Darker 35% (fifth row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 80%.Click the button next to Color, and then under Theme ColorsclickWhite, Background 1, Darker 35% (fifth row, first option from the left).Select Stop 3 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme ColorsclickWhite, Background 1, Darker 15% (third row, first option from the left).Right-click the top left shape in the graphic, and then click Format Shape. In the Format Shape dialog box, in the left pane, click Fill. In the Fill pane, click Picture or texture fill,and then under Insert from, click File.In the Insert Picture dialog box, select a picture and then click Insert. Right-click the top right shape in the graphic, and then click Format Shape. In the Format Shape dialog box, in the left pane, click Fill. In the Fill pane, click Picture or texture fill,and then under Insert from, click File.In the Insert Picture dialog box, select a picture and then click Insert. Right-click the bottom left shape in the graphic, and then click Format Shape. In the Format Shape dialog box, in the left pane, click Fill. In the Fill pane, click Picture or texture fill,and then under Insert from, click File.In the Insert Picture dialog box, select a picture and then click Insert. Right-click the bottom right shape in the graphic, and then click Format Shape. In the Format Shape dialog box, in the left pane, click Fill. In the Fill pane, click Picture or texture fill,and then under Insert from, click File.In the Insert Picture dialog box, select a picture and then click Insert. To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic, and then do the following in the CustomAnimation task pane: Click Add Effect, point to Entrance, and then click MoreEffects. In the Add Entrance Effect dialog box, under Subtle, click Expand. Under Modify: Expand, in the Speed list, select Fast.Under Modify: Expand, in the Start list, select After Previous.Also in the Custom Animation task pane, click the arrow to the right of theanimation effect, and then click EffectOptions. In the Expand dialog box, on the SmartArt Animation tab, in the Group Graphic list, select One by one.Also in the Custom Animation taskpane, click the double-arrow below the animation effect to expand the list of effects, and then do the following:Press and hold CTRL, and then select all five animation effects in the Custom Animation task pane. Under Modify: Expand, in the Start list, select With Previous.Press and hold CTRL, select the second, third, fourth, and fifth animation effects (expand effects for the picture-filled rectangles), and then do the following:Click Change, point to Entrance, and then click MoreEffects. In the Change Entrance Effect dialog box, under Basic, click Peek In. Under Modify: Peek In, in the Speed list, select Fast.Select the second animation effect. Under Modify: Peek In, in the Start list, select After Previous.Select the third animation effect. Under Modify: Peek In, in theDirection list, select From Left.Select the fourth animation effect. Under Modify: Peek In, in the Direction list, select From Right.Select the fifth animation effect. Under Modify: Peek In, in the Direction list, select From Top.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.Click the button next to Direction, and then click From Corner (fifth option from the left).Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme ColorsclickWhite, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 71%.Click the button next to Color, and then under Theme ColorsclickWhite, Background 1, Darker 15% (third row, first option from the left).
  • SmartArt custom animation effects: continuous picture list(Basic)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click List. In the List pane, double-click Continuous Picture List (third row, fourth option from the left) to insert the graphic into the slide.On the slide, select the graphic. Under SmartArt Tools, on the Format tab, click Size, and then do the following:In the Height box, enter 5.05”.In the Width box, enter 7.57”.Under SmartArt Tools, on the Format tab, click Arrange, click Align, and then do the following:Click Align to Slide.Click Align Middle. Click Align Center. Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text.Select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under Best Match for Document clickselect Moderate Effect (fourth option from the left).Click each of the three picture placeholders in the SmartArt graphic, and then in the Insert Picture dialog box, select a picture and click Insert.Press and hold CTRL, and then select the three circle pictures on the slide.Under PictureTools, on theFormat tab, in the PictureStyles group, click PictureEffects, point toGlow, and then do the following:Under Glow Variations, click Accent color 1, 8 pt glow(second row, first option from the left).Point to MoreGlowColors,and then under Theme Colors click Orange, Accent 6, Lighter 80% (second row, 10th option from the left).Select the left-right arrow at the bottom of the SmartArt graphic. Under SmartArtTools, on the Format tab, in the ShapeStyles group, click the arrow next to ShapeFill, point to Gradient, and then click MoreGradients. In the Format Shape dialog box, click Fill in the left pane,select Gradient fill in the Fill pane, and then do the following:In the Type list, select Linear.Click the button next to Direction, and then select Linear Right (first row, fourth option from the left).Under Gradient stops, click Add or Remove until three stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme ColorsclickOrange, Accent 6, Darker 25% (fifth row, 10th option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 50%.Click the button next to Color, and then click MoreColors. In the Colors dialog box,on theCustom tab, enter values for Red: 255, Green: 192, Blue: 0.Select Stop 3 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme ColorsclickOrange, Accent 6, Darker 25% (fifth row, 10th option from the left).Press and hold CTRL, and then select the three rounded rectangles on the slide. On the Home tab, in the Font group, select Gill Sans MT from the Font list, enter 30 pt in the Font Size box, click the arrow next to Font Color, and then click White, Background 1 (first row, first option from the left).Under SmartArtTools, on the Format tab, in the ShapeStyles group, click Shape Effects, point to Reflection, and then under ReflectionVariations click Tight reflection, touching (first row, first option from the left).Under SmartArtTools, on the Format tab, in the ShapeStyles group, click Shape Fill, point to Gradient, and then click More Gradients. In the Format Shape dialog box, in the left pane, click Fill, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Linear.In the Direction list, select Linear Down (first row, second option from the left).Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 19%.Click the button next to Color, and then under Theme ColorsclickBlack, Text 1 (first row, second option from the left). Select Stop 2 from the list, and then do the following: In the Stop position box, enter100%.Click the button next to Color, and then under Theme ColorsclickBlack, Text 1, Lighter 50% (second row, second option from the left).To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic. In the Custom Animation task pane, do the following:Click Add Effect, point to Entrance, and then clickMoreEffects. In the Add Entrance Effect dialog box, underModerate, clickStretch. Under Modify: Stretch, in the Speed list, selectFast.Also in the CustomAnimation task pane, click the arrow to the right of the animation effect, and then click Effect Options. In the Stretch dialog box, on the SmartArtAnimation tab, in the Group graphic list, select One by One.Also in the CustomAnimation task pane, click the double arrows under the animation effect to expand the list of effects. Press and hold CTRL, and then select all of the animation effects in the Custom Animation task pane. Under Modify: Stretch, in the Start list, selectWith Previous.Select the first animation effect (stretch effect for the left-right arrow) in the CustomAnimation task pane. Under Modify: Stretch, click the arrow to the right of the effect, and then click Timing. In the Stretch dialog box, on the Timing tab, do the following: In the Delay box, enter 0.5.In the Speed box, enter 1.5 seconds.Press and hold CTRL, and then select the second and third animation effects (stretch effects for the left panel) in the CustomAnimation task pane. Under Modify: Stretch, in the Direction list, select From Right. Also in the Custom Animation task pane, with the second and third animation effects still selected, click the arrow to the right of one of those effects, and then click Timing. In the Stretch dialog box, on the Timing tab, in the Delay box, enter 1, and then click OK.Press and hold CTRL, and then select the sixth and seventh animation effects (stretch effects for the right panel) in the Custom Animation task pane. Under Modify: Stretch, in the Direction list, select From Left. Also in the Custom Animation task pane, with the sixth and seventh animation effects still selected, click the arrow to the right of one of those effects, and then click Timing. In the Stretch dialog box, on the Timing tab, in the Delay box, enter 1.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.Click the button next to Direction, and then click From Center(third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme Colors click White, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme Colors click Black, Text 1, Lighter 25% (fourth row, second option from the left).
  • SmartArt custom animation effects: radial list(Intermediate)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click Relationship. In the Relationship pane, click Radial List (fifth row, fourth option from the left), and then click OK to insert the graphic into the slide.To enter text, select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, in the top level bullets, enter the text for the three, smaller circle shapes in the graphic. In the second-level bullets, type the text for the bullets to the right of the three, smaller circle shapes.On the slide, select the SmartArt, and then on the Design tab, in the Themes group, click Colors, and under Built-In, select Technic.Press and hold CTRL, and on the slide, select the large circle and all three small circles.On the Home tab, in the Drawing group, click the arrow to the right of ShapeEffects, point to Preset, and then under Presets select Preset2 (first row, second option from the left).On the slide, click the picture placeholder in the center of the large circle. In the Insert Picture dialog box, select a picture, and then click Insert. (Notes: (1) If the picture in the large circle is distorted, tile the picture as a texture by selecting the large, picture-filled circle, and then on the Home tab, in the bottom right corner of the Drawing group, click the FormatShape dialog box launcher. In the FormatShape dialog box, click Fill in the left pane, and in the Fill pane check Tilepicture as texture.(2) If necessary, change the tile position of the picture within the shape. To do this, in the FormatShape dialog box, in the Fill pane, under Tiling options, enter values into the OffsetX and OffsetY boxes to reposition the focal point of the picture. To resize the picture, in the FormatShape dialog box, in the Fill pane, under Tiling options, enter values into the Scale X and Scale Y boxes.)Select the top, small circle in the SmartArt graphic. On the Home tab, in the bottom right corner of the Drawing group, click the FormatShape dialog box launcher. In the FormatShape dialog box, click Fill in the left pane, and in the Fill pane click Solidfill, and then in the Color list, select Gray-25%, Background 2, Darker 75% (fifth row, third option from the left).Select the middle small circle in the SmartArt graphic.On the Home tab, in the bottom right corner of the Drawing group, click the FormatShape dialog box launcher. In the FormatShape dialog box, click Fill in the left pane, click Solidfill in the Fill pane, and then in the Color list select Gold, Accent 2 (first row, sixth option from the left).Select the bottom small circle in the SmartArt graphic. On the Home tab, in the bottom right corner of the Drawing group, click the FormatShape dialog box launcher. In the FormatShape dialog box, click Fill in the left pane, click Solidfill in the Fill pane, and then in the Color list select Lavender, Accent 3 (first row, seventh option from the left).Press and hold CTRL, and select all three lines connecting the large circle to the three smaller circles. On the Home tab, in the bottom right corner of the Drawing group, click the FormatShape dialog box launcher. In the FormatShape dialog box, do the following:Click LineColor in the left pane, and in the LineColor pane click Solidline.Also in the LineColor pane, in the Color list select White, Background 1, Darker 25% (fourth row, first option from the left).Also in the Format Shape dialog box, click LineStyle in the left pane, and in the LineStyle pane, do the following: In the Width box, enter 2.5 pt.In the Dashtype list, select RoundDot (second option from the top).Press and hold CTRL, and select all three text boxes in the SmartArt graphic. On the Home tab, in the Font group, in the FontSize box, enter 22.To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation. Select the SmartArt graphic on the slide, and then in the CustomAnimation task pane, do the following:Click AddEffect, point to Entrance, and select MoreEffects. In the AddEntranceEffect dialog box, under Subtle, select Fade.Click the arrow to the right of the fade entrance effect and select EffectOptions. In the Fade dialog box, do the following:On the Timing tab, in the Start list, select WithPrevious.On the Timing tab, in the Speed list, select 1 seconds (Fast). On the SmartArtAnimation tab, in the Groupgraphic list, select One by one. Click the double arrow under the animation effect to expand the list of effects.Select the first effect in the list (fade entrance effect), and then click Change, point to Entrance, and select MoreEffects. In the ChangeEntranceEffect dialog box, under Moderate, select Grow & Turn.Select the second effect in the list (fade entrance effect), and then click Change, point to Entrance and select MoreEffects. In the ChangeEntranceEffect dialog box, under Basic, select Wipe.Select the second effect in the list again (wipe entrance effect). Under Modify: Wipe,do the following:In theStart list, select AfterPrevious.In the Direction list, select FromLeft.In the Speed list, select VeryFast.Select the third effect in the list (fade entrance effect), and then click Change, point to Entrance, and select MoreEffects. In the ChangeEntranceEffect dialog box, under Subtle, select FadedZoom.Select the third effect in the list again (faded zoom entrance effect). Under Modify: Faded Zoom, do the following:In the Start list, select WithPrevious.In the Speed list, select Fast.Select the fourth effect in the list (fade entrance effect), and under Modify: Fade, in the Start list select WithPrevious.Press and hold CTRL, and select the fifth and eighth effects in the list (fade entrance effects), and then click Change, point to Entrance, and select MoreEffects. In the ChangeEntranceEffect dialog box, under Basic select Wipe, and then click OK.With the fifth and eighth effects in the list still selected (wipe entrance effects), under Modify: Wipe,do the following:In the Direction list, select FromLeft.In the Speed list, select VeryFast.Press and hold CTRL, and select the sixth and ninth effects in the list (fade entrance effects). Click Change, point to Entrance, and select MoreEffects. In the ChangeEntranceEffect dialog box, under Subtle, select FadedZoom.With the sixth and ninth effects in the list still selected (faded zoom entrance effects), under Modify: Faded Zoom,do the following:In the Start list, select WithPrevious.In the Speed list, select VeryFast.Press and hold CTRL, and select the seventh and 10th animation effects in the list (fade entrance effects), and then under Modify: Fade, in the Start list, select AfterPrevious.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.Click the button next to Direction, and then click From Center (third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under ThemeColors select White, Background 1 (first row, first option from the left). Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under ThemeColors select White, Background 1, Darker 35% (fifth row, first option from the left).
  • SmartArt custom animation effects: expand and wipe(Intermediate)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click Cycle. In the Cycle pane, click Block Cycle (first row, third option from the left), and then click OK to insert the graphic into the slide.Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text.On the slide, select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under 3-D click Polished (first row, first option from the left).On the Home tab, in the Font group, select Calibrifrom the Font list, and then select 24 from the Font Size list. To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic. In the Custom Animation task pane, do the following:Click Add Effect, point to Entrance, and then click More Effects. In the Add Entrance Effect dialog box, under Subtle, click Expand. UnderModify: Expand, in theSpeedlist, selectVery Fast.Also in the Custom Animation task pane, select the expand effect. Click the arrow to the right of the expand effect, and then click Effect Options. In the Expand dialog box, on the SmartArt Animation tab, in the Group graphic list, select One by one.Also in the Custom Animation task pane, click the double arrow under the expand effect to expand the contents of the list of effects.Press and hold CTRL, and then select all 10 animation effects in the Custom Animation task pane. Under Modify: Expand, in the Start list, select After Previous. Press and hold CTRL, and then select the second, fourth, sixth, eighth, and 10th animation effects in the Custom Animation task pane. Click Change, point to Entrance, and then click More Effects. In the Change Entrance Effect dialog box, under Basic, click Wipe. Also in the Custom Animation task pane, do the following:Select the second animation effect (first wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the fourth animation effect (second wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the sixth animation effect (third wipe effect). Under Modify: Wipe, in the Direction list, select From Right.Select the eighth animation effect (fourth wipe effect). Under Modify: Wipe, in the Direction list, select From Bottom.Select the 10th animation effect (fifth wipe effect). Under Modify: Wipe, in the Direction list, select From Left.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.In the Direction list, click From Center (third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme Colors click White, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme Colors click White, Background 1, Darker 50%(sixth row, first option from the left).
  • SmartArt custom animation effects: expand and wipe(Intermediate)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click Cycle. In the Cycle pane, click Block Cycle (first row, third option from the left), and then click OK to insert the graphic into the slide.Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text.On the slide, select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under 3-D click Polished (first row, first option from the left).On the Home tab, in the Font group, select Calibrifrom the Font list, and then select 24 from the Font Size list. To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic. In the Custom Animation task pane, do the following:Click Add Effect, point to Entrance, and then click More Effects. In the Add Entrance Effect dialog box, under Subtle, click Expand. UnderModify: Expand, in theSpeedlist, selectVery Fast.Also in the Custom Animation task pane, select the expand effect. Click the arrow to the right of the expand effect, and then click Effect Options. In the Expand dialog box, on the SmartArt Animation tab, in the Group graphic list, select One by one.Also in the Custom Animation task pane, click the double arrow under the expand effect to expand the contents of the list of effects.Press and hold CTRL, and then select all 10 animation effects in the Custom Animation task pane. Under Modify: Expand, in the Start list, select After Previous. Press and hold CTRL, and then select the second, fourth, sixth, eighth, and 10th animation effects in the Custom Animation task pane. Click Change, point to Entrance, and then click More Effects. In the Change Entrance Effect dialog box, under Basic, click Wipe. Also in the Custom Animation task pane, do the following:Select the second animation effect (first wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the fourth animation effect (second wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the sixth animation effect (third wipe effect). Under Modify: Wipe, in the Direction list, select From Right.Select the eighth animation effect (fourth wipe effect). Under Modify: Wipe, in the Direction list, select From Bottom.Select the 10th animation effect (fifth wipe effect). Under Modify: Wipe, in the Direction list, select From Left.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.In the Direction list, click From Center (third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme Colors click White, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme Colors click White, Background 1, Darker 50%(sixth row, first option from the left).
  • SmartArt custom animation effects: expand and wipe(Intermediate)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click Cycle. In the Cycle pane, click Block Cycle (first row, third option from the left), and then click OK to insert the graphic into the slide.Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text.On the slide, select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under 3-D click Polished (first row, first option from the left).On the Home tab, in the Font group, select Calibrifrom the Font list, and then select 24 from the Font Size list. To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic. In the Custom Animation task pane, do the following:Click Add Effect, point to Entrance, and then click More Effects. In the Add Entrance Effect dialog box, under Subtle, click Expand. UnderModify: Expand, in theSpeedlist, selectVery Fast.Also in the Custom Animation task pane, select the expand effect. Click the arrow to the right of the expand effect, and then click Effect Options. In the Expand dialog box, on the SmartArt Animation tab, in the Group graphic list, select One by one.Also in the Custom Animation task pane, click the double arrow under the expand effect to expand the contents of the list of effects.Press and hold CTRL, and then select all 10 animation effects in the Custom Animation task pane. Under Modify: Expand, in the Start list, select After Previous. Press and hold CTRL, and then select the second, fourth, sixth, eighth, and 10th animation effects in the Custom Animation task pane. Click Change, point to Entrance, and then click More Effects. In the Change Entrance Effect dialog box, under Basic, click Wipe. Also in the Custom Animation task pane, do the following:Select the second animation effect (first wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the fourth animation effect (second wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the sixth animation effect (third wipe effect). Under Modify: Wipe, in the Direction list, select From Right.Select the eighth animation effect (fourth wipe effect). Under Modify: Wipe, in the Direction list, select From Bottom.Select the 10th animation effect (fifth wipe effect). Under Modify: Wipe, in the Direction list, select From Left.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.In the Direction list, click From Center (third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme Colors click White, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme Colors click White, Background 1, Darker 50%(sixth row, first option from the left).
  • SmartArt custom animation effects: expand and wipe(Intermediate)To reproduce the SmartArt effects on this slide, do the following:On the Home tab, in the Slides group, click Layout, and then clickBlank. On the Insert tab, in the Illustrations group, click SmartArt. In the Choose a SmartArt Graphic dialog box, in the left pane, click Cycle. In the Cycle pane, click Block Cycle (first row, third option from the left), and then click OK to insert the graphic into the slide.Select the graphic, and then click one of the arrows on the left border. In the Type your text here dialog box, enter text.On the slide, select the graphic. Under SmartArtTools, on the Design tab, in the SmartArtStyles group, click More, and then under 3-D click Polished (first row, first option from the left).On the Home tab, in the Font group, select Calibrifrom the Font list, and then select 24 from the Font Size list. To reproduce the animation effects on this slide, do the following:On the Animations tab, in the Animations group, click CustomAnimation.On the slide, select the graphic. In the Custom Animation task pane, do the following:Click Add Effect, point to Entrance, and then click More Effects. In the Add Entrance Effect dialog box, under Subtle, click Expand. UnderModify: Expand, in theSpeedlist, selectVery Fast.Also in the Custom Animation task pane, select the expand effect. Click the arrow to the right of the expand effect, and then click Effect Options. In the Expand dialog box, on the SmartArt Animation tab, in the Group graphic list, select One by one.Also in the Custom Animation task pane, click the double arrow under the expand effect to expand the contents of the list of effects.Press and hold CTRL, and then select all 10 animation effects in the Custom Animation task pane. Under Modify: Expand, in the Start list, select After Previous. Press and hold CTRL, and then select the second, fourth, sixth, eighth, and 10th animation effects in the Custom Animation task pane. Click Change, point to Entrance, and then click More Effects. In the Change Entrance Effect dialog box, under Basic, click Wipe. Also in the Custom Animation task pane, do the following:Select the second animation effect (first wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the fourth animation effect (second wipe effect). Under Modify: Wipe, in the Direction list, select From Top.Select the sixth animation effect (third wipe effect). Under Modify: Wipe, in the Direction list, select From Right.Select the eighth animation effect (fourth wipe effect). Under Modify: Wipe, in the Direction list, select From Bottom.Select the 10th animation effect (fifth wipe effect). Under Modify: Wipe, in the Direction list, select From Left.To reproduce the background effects on this slide, do the following:Right-click the slide background area, and then click Format Background. In the Format Background dialog box, click Fill in the left pane, select Gradient fill in the Fill pane, and then do the following:In the Type list, select Radial.In the Direction list, click From Center (third option from the left). Under Gradient stops, click Add or Remove until two stops appear in the drop-down list.Also under Gradient stops, customize the gradient stops that you added as follows:Select Stop 1 from the list, and then do the following:In the Stop position box, enter 0%.Click the button next to Color, and then under Theme Colors click White, Background 1 (first row, first option from the left).Select Stop 2 from the list, and then do the following: In the Stop position box, enter 100%.Click the button next to Color, and then under Theme Colors click White, Background 1, Darker 50%(sixth row, first option from the left).
  • For reproduction steps for this slide, refer to the PowerPoint template titled “Static text effects for PowerPoint slides” (STATIC_TEXT.potx), slide number 17.
  • Transcript of "WinStore.vn - Cấu trúc dữ liệu và giải thuật buổi 1"

    1. 1. Cấu trúc dữliệu và giải thuật
    2. 2. Tìm kiếm Merge Quick Sortnhị phân Sort
    3. 3. • Tìm kiếm trên Tìm mảng tăng dần.kiếm nhị phân • 30 lần tìm kiếm cho 1 tỉ dữ liệu. Merge • Thuật toán sắp Sort xếp nhanh. • Thuật toán sắp Quick xếp nhanh Sort nhất.
    4. 4. Minh Họa Thuật Toán Tìm Nhị Phân
    5. 5. Minh Họa Thuật Toán Tìm Nhị PhânTìm thấy 2 tại vị trí 1 X=2 L M R 1 2 4 6 7 9 10 0 1 2 3 4 5 6
    6. 6. Minh Họa Thuật Toán Tìm Nhị Phân (tt) X=-1 L M R 1 2 4 6 7 9 10 0 1 2 3 4 5 6L=0R=-1 => không tìm thấy X=-1
    7. 7. Minh Họa Thuật Toán Tìm Nhị Phân (tt)Cho mảng sau: 2 2 2 3 7 8 9 10 15.1. Tìm phần tử k=15.2. Tìm phần tử k=2 và cho biết số 2 được tìm thấy nằm ở đâu trong mảng.
    8. 8. Merge Sort – thuật toán
    9. 9. Merge Sort – Ví Dụ k=1Phân phối luân phiên 0 1 2 3 4 5 6 7 12 2 8 5 1 6 4 15
    10. 10. Merge Sort – Ví Dụk = 1 Phân phối luân phiên 0 1 2 3 4 5 6 712 2 8 5 1 6 4 15
    11. 11. Merge Sort – Ví DụTrộn từng cặp đường chạy0 1 2 3 4 5 6 712 8 1 42 5 6 15
    12. 12. Merge Sort – Ví Dụk = 1 Trộn từng cặp đường chạy0 1 2 3 4 5 6 712 8 1 42 5 6 15
    13. 13. Merge Sort – Ví Dụk = 2 Phân phối luân phiên2 12 5 8 1 6 4 150 1 2 3 4 5 6 7
    14. 14. Merge Sort – Ví Dụk = 2 Trộn từng cặp đường chạy0 1 2 3 4 5 6 72 12 1 65 8 4 15
    15. 15. Merge Sort – Ví Dụk = 2 Trộn từng cặp đường chạy 0 1 2 3 4 5 6 7 2 12 1 6 5 8 4 15
    16. 16. Merge Sort – Ví Dụk = 4 Phân phối luân phiên2 5 8 12 1 4 6 150 1 2 3 4 5 6 7
    17. 17. Merge Sort – Ví Dụk = 4 Trộn từng cặp đường chạy 0 1 2 3 4 5 6 7 2 5 8 12 1 4 6 15
    18. 18. Merge Sort – Ví Dụk = 4 Trộn từng cặp đường chạy 0 1 2 3 4 5 6 7 2 5 8 12 1 4 6 15
    19. 19. Merge Sort – Ví Dụk = 80 1 2 3 4 5 6 71 2 4 5 6 8 12 15
    20. 20. Merge Sort – Ví Dụ1 2 3 4 5 6 7 81 2 4 5 6 8 12 15
    21. 21. Merge Sort – Ví DụCho ví dụ
    22. 22. Quick Sort1. X là phần tử nằm giữa mảng.2. Tìm các phần tử bên trái X mà lớn hơn X, đưa các phần tử nàyvề phía bên phải X.3. Tìm các phần tử bên phải X mà nhỏ hơn X, đưa các phần tử nàyvề bên trái X. Mảng chính sẽ phân hoạch thành 3 phần: • Phần 1: Gồm các phần tử có giá trị bé hơn x • Phần 2: Gồm các phần tử có giá trị bằng x • Phần 3: Gồm các phần tử có giá trị lớn hơn x Lặp lại các bước trên với phần 1 và phần 2
    23. 23. Quick Sort
    24. 24. Quick Sort – Ví Dụ • Cho dãy số a: 12 2 8 5 1 6 4 15Phân hoạch đoạn l =0, r = 7: x = a[3] = 5 12 2 8 5 1 6 4 15 l=0 r=7
    25. 25. Quick Sort – Ví Dụ 4 2 8 5 1 6 12 15 i=0 j=6l=0 r=7 4 2 8 5 1 6 12 15 i=1 i=2l=0 j=3 j=4 j=5 r=7
    26. 26. Quick Sort – Ví Dụ• Phân hoạch đoạn l = 0, r = 2:4 2 1 5 8 6 12 15l=0 r =3i=0 j=2
    27. 27. Quick Sort – Ví Dụ• Phân hoạch đoạn l =4, r = 7:1 2 4 5 8 6 12 15 l=4 r =7 i=4 j=6 j=6 j=71 2 4 5 i=6 4 8 12 15 l=4 r =7
    28. 28. Quick Sort – Ví Dụ• Phân hoạch đoạn l =6, r = 7:1 2 4 5 6 8 12 15
    29. 29. Quick Sortvoid QuickSort(int a[], int left, int right){ int i, j, x; x = a[(left+right)/2]; i = left; j = right; do { while(a[i] < x) i++; while(a[j] > x) j--; if(i <= j) { Swap(a[i],a[j]); i++ ; j--; } } while(i <= j); if(left<j) QuickSort(a, left, j); if(i<right) QuickSort(a, i, right);}
    30. 30. Quick Sort – Ví Dụ Phân hoạch đọan [0,7] i j 0 1 2 3 4 5 6 7 12 2 8 5 5 1 6 4 15left X righ t
    31. 31. Quick Sort – Ví Dụ Phân hoạch đọan [0,7] X 5 i j 0 1 2 3 4 5 6 7 4 2 8 5 1 6 12 15 left righ t
    32. 32. Quick Sort – Ví Dụ Phân hoạch đọan [0,2] j i 0 1 2 3 4 5 6 7 4 2 1 5 8 6 12 15 left righ t
    33. 33.  Phân hoạch đọan [0,2] i j 0 1 2 3 4 5 6 7 4 2 1 5 8 6 12 15 X left righ t
    34. 34. Quick Sort – Ví Dụ Phân hoạch đọan [4,7] i j 0 1 2 3 4 5 6 7 1 2 4 5 8 6 12 15 X left righ t
    35. 35. Quick Sort – Ví Dụ Phân hoạch đọan [5,7] j i 0 1 2 3 4 5 6 7 1 2 4 5 6 8 12 15 left righ t
    36. 36. Quick Sort – Ví Dụ Phân hoạch đọan [5,7] i j 0 1 2 3 4 5 6 7 1 2 4 5 6 8 12 15 left righ t
    37. 37. Quick Sort – Ví Dụ Quick Sort – Ví Dụ0 1 2 3 4 5 6 71 2 4 5 6 8 12 15
    38. 38. Quick Sort – Ví DụCho ví dụ

    ×