Explore BrainMass

Explore BrainMass

    Sorting

    BrainMass Solutions Available for Instant Download

    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);

    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

    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.

    Describe an Algorithm

    The question is attached and there are some clarifications 1. The integers are NOT sorted and you CANNOT sort them. You need to see if the numbers would match the pattern if you were to sort them. 2. a and b can be any integer and we don't know the values in advance.

    Describing Algorithms

    Suppose you are given a list of n integers in random order. Describe an algorithm that will determine whether the numbers would be an arithmetic progression if they were sorted. Note: An arithmetic progression is a set of numbers of the form {a + bj | j = 0, 1, 2, ... n - 1} where a and b are both integers. To get any marks your

    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

    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

    Span of an Element in a Non-Decreasing Sorted Sequence

    Give the pseudo code for finding the span of an element in a non-decreasing sorted sequence of given length. Sequence is indexed from 1 onwards. For example, in the sequence {0,2,3,3,4,5,5,5,5,6,8,10,11,11,12}, span of element 5 is [6-9], and for element 2 it is [2,2].

    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

    Write a computer program

    Give the pseudo algorithms for the first five approaches. See attached file for full problem description.

    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