More Sort Names • Bubble sort · Cocktail sort · Odd-even sort · Comb sort · Gnome sort · Quicksort · Selection sort · Heapsort · Smoothsort · Cartesian tree sort · Tournament sort · Cycle sort · Insertion sort · Shell sort · Tree sort · Library sort · Patience sorting · Monkey-puzzle sort · Merge sort · Polyphase merge sort · Strand sort · American flag sort · Bead sort · Bucket sort · Burstsort · Counting sort · Pigeonhole sort · Proxmap sort · Radix sort · Flashsort · Bitonic sorter · Batcher odd-even mergesort · Timsort · Introsort · Spreadsort · UnShuffle sort · JSort · Spaghetti sort · Pancake sort
View full slide show




Review: Use the examples below to help you define Polyhedra and Non-Polyhedra. Polyhedra Non-Polyhedra Polyhedra: a solid with flat faces Non-Polyhedra: solid with any surface that is not flat
View full slide show




Task 2: Implement the following sorting algorithms: selection sort, insertion sort, quick sort and merge sort, and compare them by real running time Requirements • Find the running time as follows: check the current time t1; repeat the following steps 1000 times { randomly generate 10000 integers and save into array A; sort the integers in A using selection sort (or insertion sort, quick sort, merge sort); sort) } check the current time t2; running time of selection sort (or insertion sort, quick sort, merge sort) : = t2 – t1; • Implement the algorithms using C, C++, C#, or any other programming language. Submission Project description, Algorithms, Algorithm analysis, Experiment output, Code.
View full slide show




Creature Contest Working with a partner, you are going to create a toy creature that could be a character in a video game. You must: • Use at least ten 3-dimensional shapes • Have at least 3 polyhedra and 3 non-polyhedra • All shapes must be complete (no partial shapes) • Your shapes must be independent, as your creature must be able to be assembled, disassembled, and reassembled. It will become part of a set (like Legos!) No weapons or inappropriate language are allowed! But…. There’s a catch….
View full slide show




Working with your shoulder partner, sort your shapes into polyhedra and non-polyhedra.
View full slide show




Sorting a Table on Multiple Fields Using the Custom Sort Command • With a cell in the table active, click the Sort & Filter button (Home tab | Editing group) to display the Sort & Filter menu • Click Custom Sort on the Sort & Filter menu to display the Sort dialog box • Click the Sort by box arrow to display the field names in the table • Click the first field on which to sort to select the first sort level • Select the desired options for Sort On and Order • Click the Add Level button to ask a new sort level, and then repeat the previous two steps • Click the OK button to sort the table Creating, Sorting, and Querying a Table 27
View full slide show




Calling a virtual function { //Construct some shapes Shape aShape; Circle c(Point(20,30),7); //illegal--why? //legal--what does it do? //Create an array of various shapes Shape* shapes[10]; //Why is this legal? shapes[0] = new Circle(Point(20,30),7); //assign a Circle shapes[1] = new Triangle(Point(50,50),Point(30,30),Point(40,40)); //... maybe assign other shapes, Rectangles, Squares, etc. for (int i=0; i < 10; i++) //draw all the shapes shapes[i]->draw(); //each shape draws itself! } Why do we say that elements of shapes array are polymorphic? How does polymorphic design support Open-Closed principle? Apr 1, 2019 9
View full slide show




Sorting Multiple Columns using the Sort Dialog Box XP • Click any cell in a table or range • In the Sort & Filter group on the Data tab, click the Sort button to open the Sort dialog box • If the Sort by row exists, modify the primary sort by selections; otherwise, click the Add Level button to insert the Sort by row • Click the Sort by arrow, select the column heading that you want to specify as the primary sort field, click the Sort On arrow to select the type of data, then click the Order arrow to select the sort order New Perspectives on Microsoft Office Excel 2007 14
View full slide show




 Sort Animator: • http://www.csbsju.edu/computer-science/useful-links/launchcs-applications • Comparison Sorting • • • • • • • • • • Bubble Sort Selection Sort Insertion Sort Shell Sort Merge Sort Quick Sort Bucket Sort Counting Sort Radix Sort Heap Sort From: http://www.cs.usfca.edu/~galles/visualization/ Copyright © 2014 by John Wiley & Sons. All rights reserved. 32
View full slide show




 Sort Animator: • http://www.csbsju.edu/computer-science/useful-links/launchcs-applications • Comparison Sorting • • • • • • • • • • Bubble Sort Selection Sort Insertion Sort Shell Sort Merge Sort Quick Sort Bucket Sort Counting Sort Radix Sort Heap Sort From: http://www.cs.usfca.edu/~galles/visualization/ Copyright © 2014 by John Wiley & Sons. All rights reserved. 33
View full slide show