60 likes | 125 Views
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).
E N D
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)
What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)
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?
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 }
What kind of sort is represented by the passes shown below? (The definition of a pass is non-standard, so be flexible)