Share
Explore BrainMass

# Sorting

### Three example C++ programs

Please assist with questions 1, 2, and 3... do not assist with 4. Please see the attached file.

### Most favorite loop structure

What is the most favorite loop structure, and why? How might you use it in a real business programming problem? Give an example of how you might use a C array to solve a real life business problem. Extra(notreally!): post a code sample too.

### Explanation of how to make an algorithm more efficient

I have an algorithm called MinDistance that determines the distance between the two closest elements in an array. I need to make it more efficient. Here is the algorithm, written in pseudocode: MinDistance(A[0...n-1] dmin <-- infinity for i <--- 0 to n - 1 do for j <--- 0 to n - 1 do if i does not equal j a

### Sorting Algorithm in Java

Please assist so that I can complete the following: You will create a program that runs a sorting algorithm on a set of randomized values. Your program should run the algorithm several times, to get the average time for each sorting technique. STEPS 1. Write a program using C++ or Java that will take in randomized value

### Big-O, Big-Omega, Big-Theta

Let f, g, h, and k be the following functions: f(x) = 3*(x^2) + 4*ln(x) + 9 g(x) = x^2 h(x) = x^5 k(x) = 1 [the constant function "1"] Throughout the statement and solution to this problem, a caret ("^") denotes that the number immediately following it is an exponent. -------------------------------------------

### Data structures C++ -- Quick sort Algorithm

Use the quicksort algorithm to sort vector v. During each pass, list all exchanges of a pair of elements in the lower and upper sublist. List the ordering of the elements after each pass. int arr[] = {790, 175, 284, 581, 374, 799, 852, 685, 486, 333}; int arrSize = sizeof(arr)/sizeof(int); vector<int>v(arr, arr+arrSize);

### How does Public Key Infrastructure protect information assets?

How does Public Key Infrastructure protect information assets? What are the six components of PKI?

### Java: Inventory Output

Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previous

### Describe a situation in which you could implement an array.

Describe how items in the array might be searched for or sorted. How might array applications be useful in your everyday work? I am lost on this and need a response of 200 word or more. Thank you

### Creating Pseudocodes and Flow Charts

How do you write pseudocode and a flow chart that would let you put in up to 50 student names and 4 grades for each? The names need to be sorted alphabetically and the grades averaged and sorted from highest to lowest.

### Effects of Pronation on Knee Injury Risk

Please read this articles both are critical for the discussion on the topic on Effects of Pronation on Knee Injury Risk. Read the articles from: a) Powers 2003 b) Shultz 2006 In a 1-page document,(essay type) describe how the inability to control forefoot pronation during functional tasks may increase injury risk to th

### iHaul Sales Force Facts and Figures

Looking for help in completing this problem. It has to be done in Microsoft Excel 2007. Thank you Instructions - Open Excel and start with a blank spreadsheet. In cell A10 type in the words "iHaul Sales Force Facts and Figures" - do not use quotes, do use font size 16, and make the text bold. Merge and center these word

### Create a Database Diagram

Assume that FiredUp has created a database with the following tables: CUSTOMER (CustomerSK, Name, Phone, EmailAddress) STOVE (SerialNumber, Type, Version, DateOfManufacture) REGISTRATION (CustomerSK, SerialNumber, Date) STOVE_REPAIR (RepairInvoiceNumber, SerialNumber, Date, Description, TotalCost, TotalPaid, CustomerSK) A

### Analyzing Basic Algorithms

Given a list L[0:n - 1], one way of maintaining a sorted order of L is to use an auxiliary array Link[0:n - 1]. The array Link[0:n - 1] serves as a linked list determining the next highest element in L, so the elements of L can be given in nondecreasing order by L[Start], L[Link[Start]], L[Link[Link[Start]]], and so forth. The

### Sorting Algorithms Comparison

We have considered the following sorting algorithms in this book: Heap, Insertion, Merge, Quicksort, Radix, Selection For each sort, give the average and worst case running time and the space requirements, and make some additional comments about the efficiency of the algorithm. The additional comments may specify how proba

### Discuss the design stage of a hypothetical work-related project

Describe the alternatives that were considered during the design stage of the project. What were the considerations in choosing the best alternative strategy? Outline the design tools and techniques used for the project. You may draw any supporting structure charts and process design to support your description and import into t

### Comparison and Examples of Sorting Algorithms

Compare and evaluate performance of various sorting algorithms. Include exchange (bubble) sort, selection sort, insertion sort, quick sort, merge sort and heap sort.

### Sorting Algorithms

Sort the following array using insertion sort manually: 7-4-1-6-2-3-8-5. Show the results after each pass in a table. Explain, briefly, what happens in each row. Sort the same array using quick sort manually. Select the pivot from the midpoint in the list. Indicate all exchanges that move a corresponding pair of elements in the

### Sorting Algorithms C++

Please help with the following problem. Prompt the user for the name and age of a group of people. The group's size is unknown initially, so the program must keep asking the user if they want to enter more data. When the user finishes, the program should print each person in order from the youngest to the oldest, that is, th

### Data Structures C++

Describe the worst case scenario for quick sort algorithm. Any ideas to improve the worst case? Comment on the improvement in running time vs. increase in code complexity.

### Design an algorithm problem

You should post the "best possible" responses to the question. Remember that the main purpose of algorithm questions is to come up with the best possible algorithms through discussion. It is ok to write your responses using pseudocode, and there is no need to code & test using C++. 1. Design an algorithm for finding two clos

### Describe an efficient algorithm to determine the depth of a comparison network with given representation.

Mr. Johnson draws an n-input comparison network with m comparators according to the following conventions. The lines of the network go left-to-right, and comparators are drawn vertically to connect two lines. The network is drawn on an underlying grid, so that each comparator occupies one of at most m columns. Comparators can

### Execution of Binary Search Algorithm

See the attached file. Given algorithm looks for a value in a nondecreasing sequence and returns the index of the value if it is found or 0 if it is not found. Input: A sequence si, ...... ,sj (j >= i >= 1) sorted in nondecreasing order, a value key, i, and j Output: The output is an index k for which sk = key, or if key i

### Project Management Questions

- If you inherit a project which has all sorts of problems in it, what are the steps you'll take to in order to start working on it? - If a project team handles operations side of tasks as well as project development side of tasks, how would you, as a project manager balance or utilize project resources for optimal use? -

### Excel Functions in Worksheet

I need help with the following worksheets: Internet data 2 and Weekend Overtime Name: WallachShelley II I I IIIIIIIII Make this ... Look like this ... Marcos, Imelda Imelda Marcos Wallach, Shelley Shelley Wallach Wallach Shelley Ho, Don Don Ho Ho Don

### Data Connected Applications

CpCreate an MS Access database called "Members.mdb." Add a table called "tblScores" with the following columns. MemberID - AutoNumber FirstName - Text LastName - Text Add at least 10 rows to this table. Create an ASP.NET project with Visual Studio.NET that contains two aspx forms. The first form uses the Login con

### Sorting a List and Displaying Mean

Simple Array Process ? Input a list of employee names and salaries, and determine the mean (average) salary as well as the number of salaries above and below the mean. Use the top-down modular approach and pseudocode to design a suitable program to solve it. Please generate only the pseudocode (a simple one) - No charting

### Write interactive program that uses scanf()

Need to read in 7 strings input by the user.It need to print the seven strings as list than sort them alfabeticaly and print new list.use strcmp() for sorting. Also use #define N_STRINGS 7

### Algorithm: Divide a group of people into two disjoint subgroups.

For example, find a simple algorithm for solving the following problem and classify it using big-theta notation: Divide a group of people into two disjoint subgroups (of arbitrary size) such that the difference in the total ages of the members of the two subgroups is as large as possible.Now change the problem so that the des

### Pick all correct answers

Question Pick all correct answers: If f(x) = 3x^2 + 4ln(x) + 9, then f(x) is:... a. Big-Theta of g(x) = x^2 b. Big-Omega of g(x) = 1 c. An unimpressive time-cost function for a sorting algorithm d. Big-O of x^5 e. Big-Omega of x^5