1 / 6

Which is better?

What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible). What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible).

eze
Download Presentation

Which is better?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)

  2. What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)

  3. What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)

  4. Which is better? • I have an O(n) algorithm. Is it faster to solve one problem with all n items or k problems each with n/k items? Example: canning peaches is O(n). Would I be happier dividing the work into two chunks. • I have an O(n2) algorithm. Is it faster to solve one problem with all n items or k problems each with n/k items? Example: finding out which of your friends know each other is O(n2). Would it be easier to determine which of the guys know each other and which of the gals know each other?

  5. Suppose I wanted to sort a file by occurrenceCt and within ocurrenceCt, alphabetically. he 1 it 1 jump 1 she 1 follow 3 bones 5 care 5 Define the operator > used by the sort in order to realize this ordering. Class MyClass{ string word; intoccurrenceCt; } boolMyClass::operator>(MyClass &other) { return }

  6. What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)

More Related